问题:查询结果是以下,想删除全为0的这两行记录

 

 解决:

在 sql 外面在嵌套一层sql  然后where条件是 where (t.countB+t.countC+t.countD)>0

SQL语句:

select * from (select name,countB,countC,countD from a) t where (t.countB+t.countC+t.countD)>0

posted on 2020-08-07 18:08  爱吃萝卜青菜  阅读(651)  评论(0)    收藏  举报