Picture Picture Picture Picture Picture Picture Picture

一个sql语句(满足条件的字段自增)

一个表

CREATE TABLE s_ih."mode" (
	"name" varchar null ,
	value varchar NULL,
	sort int4 NULL
);

一个子查询

select sort from s_ih.mode where sort >2;

in语句

update s_ih.mode set sort = sort+1 where sort in (select sort from s_ih.mode where sort >2);

为啥用in

in用于查询多条sql

posted @ 2020-10-20 16:32  云行雨步  阅读(793)  评论(0编辑  收藏  举报
Title - Artist
0:00