MYsql同表更新及赋值

更新语句字段拼接

UPDATE triggers SET comments = concat('服务器',comments) WHERE comments ='Free inodes is less than 20%'

同表赋值语句

UPDATE triggers SET comments = description WHERE comments =''

MYSQL替换语句

UPDATE 表名 SET 字段名=replace(字段名, ‘被替换字符串’, '用来替换的字符串') ;

你可能感兴趣的:(mysql)