| How to Find & Replace in MySQL |
| Written by pH |
| Monday, 07 December 2009 06:38 |
|
This tutorial will show you how to find and replace data in MySQL
Firstly you will need to login the mysql command line: user@Box ~# mysql -u[username] -p[password] -h[hostname] database Note: The hostname is not needed in the most cases. Also do not split -p and the password. If you do so it will ask you for the password one more time.
Now to find and replace the data in MySQL we need to execute the following command: update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]'); That's it! Good luck! |
| Last Updated on Monday, 11 January 2010 06:39 |
We have 23 guests online
















Comments (0)