I have a DB with 15+ tables in it and I need to replace a brand name (one word no spaces) in all the tables with a different name. I’m a little rough around the edges’ with my SQL statements, any experts out there that can save me a few hours?
For both MySQL and MSSQL, I assume you're looking for something like ...
update tablename set col=replace(col, "old_brand", "new_brand");
TSQL (MS SQL SERVER): http://msdn.microsoft.com/en-US/library/ms186862(v=SQL.90).aspx
Is that what you need?
Thats exactly what i need.
for anyone reading this with the same problem, use:
SHOW COLUMNS FROM '.$dbtable
to grab all the columns in your table, then loop through using svidgen's command.