Tag Archives: mysql

  • IT

Replace text in mysql table

Sometimes you need to replace some text in your Mysql database. Whatever it is (a user ID or a user name), this is the SQL query you need to run:

update table_name set column_name = replace(column_name, ‘old-text’, ‘new-text’)

Read more
  • IT

Update Mysql table

This will update data in a MySQL table whether is empty or not.

UPDATE artists SET city = ‘Los Angeles’  WHERE city=’Sydney’

In this case Sydney will be replaced by Los Angeles.

Read more
Back to top