[Quote=引用 1 楼 ssp2009 的回复:]
select captureId from tb group by captureId having sum(state)=0
[/Quote]
这个虽然在这里可以,但是其实是有风险的,而且不是很直观的方法。
直接用select * from table where state=0 group by captureID.
用select *才可以保证选出来的是集,直接用state=0就可以保证全部都是state=0,而不会出现其他的组合出来的state=0的情况。谢谢