0

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/".

Many Thanks,

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by smantscheff
0

You can
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.

0

Thanks all. In the end I used the following commands,

=====
UPDATE jos_sh404sef_aliases
SET oldurl = REPLACE(oldurl, "Table/", "")
=====

0

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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.