Sql sum函数,急!哪位大侠帮帮小弟?

来源:百度知道 编辑:UC知道 时间:2024/06/01 03:29:43
表a有列b,c,d 我想删除表中所有b+c+d<1000的记录,急!

是不是每一行b+c+d<1000的数据都要删除?

那就对 b,c,d进行分组

delete
from a
where exists (select * from a group by b,c,d having (b+c+d) < 1000);

你试试,如果不行再HI我

delete from table where b+c+d<1000
试试看

delete from a where b+c+d<1000

delete from a where b+c+d<1000

delete from a where b+c+d<1000;