8bq

光辉岁月

MySQL语句集合

查询同一字段中的相同记录

1
select tt1.i_value,count(*) from cx_invite as tt1 ,cx_invite as tt2 where tt1.i_id!=tt2.i_id and tt1.i_value=tt2.i_value group by tt1.i_value;

MySQL替换语句

1
update `yourtable` set `yourcol`=replace(`yourcol`, '张三', '李四');