问题
update keywords set showcase_flag=1 where keywords.link in (SELECT link FROM keywords where showcase_flag="是") ;
进阶
update keywords set showcase_flag=1 where keywords.link in (SELECT a.link FROM (SELECT link FROM keywords where showcase_flag="是") as a);
提高
update keywords a set a.showcase_flag = case when a.showcase_flag = '是' then '1' when a.showcase_flag = '否' then '0' end;
网友评论