1.update table name set field name = REPLACE (field name, 'original content', 'new content')
this way, will update the table The specified field of all the data in the data, even if it does not contain the original content, will update
例: change all 123s in the user in the admin table to aaa
update admin set user=REPLACE(password,'123','aaa')
, at this time, if there are three pieces of data in the table, then three The data is all affected, even if the user does not contain 123
2.update admin set password=REPLACE(password,'aaa','123') where password like '%aaa%'
, this method only updates the data line containing the original content
Example: Change all 123 in the user in the admin table to aaa
update admin set user=REPLACE(password,'123','aaa') where password like '%123%'
If there are three data in the table, only one is met, then only one statement is affected.