Scroll to top

MySQL REPLACE statement with dynamic variables

I just wrote a little mysql snippet that will replace all instances of ‘domain1′ to ‘domain2′ in a given table and column. So why not share it.  All you need to do is set the variable values in first 4 lines of code below: SET @tblname = “tablename”; SET @colname = “columnname”; SET @lookfor = [...]

Read more