Find and replace particular string in a column

前端 未结 2 1840
执笔经年
执笔经年 2021-01-19 16:03

I have a table in the database where it contains some of the user name. When I copy the database files from one machine to other machine, I need to manually update this tabl

相关标签:
2条回答
  • 2021-01-19 16:14

    Try this statement:

    UPDATE your_table SET machine_name = REPLACE(machine_name, machine_name, 'Your New Value')
    
    0 讨论(0)
  • 2021-01-19 16:24
    UPDATE table_that_contains_users
    SET field_user = replace( field_user, 'OLDDOMAIN\', 'NEWDOMAIN\')
    

    is that?

    0 讨论(0)
提交回复
热议问题