Does anyone know the SQL statement for replacing a string in the whole of a database.
My database is called DB1 and I want to remove any instance of "Table/".
a) use an interface like Navicat which is capable of global search/replace operations;
b) dump the whole database to a file, replace the string on the file and reload it into the database.
To the best of my knowledge there is no mysql function which does what you wish.
Thanks all. In the end I used the following commands,
SET oldurl = REPLACE(oldurl, "Table/", "")
So you weren't looking for a global search/replace but only for the standard replace function applied to a specific column in a specific table - which is quite another task.
We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.