MYSQL 多表更新 UPDATE SET like concat('%',abc,'%');

SQL语句为:select * from table1 where  `text` like CONCAT('%',(select name from table2 where id =3),'%');

UPDATE ecs_region a,nation b SET a.code = b.code where b.province like concat('%',a.region_name,'%');

UPDATE ecs_region a,nation b SET a.code = b.code where b.city like concat('%',a.region_name,'%');

UPDATE ecs_region a,nation b SET a.code = b.code where b.district like concat('%',a.region_name,'%');

posted on 2015-08-26 07:37  今天又进步了  阅读(4958)  评论(0编辑  收藏  举报

导航