slect id from 表 where name <> 'c' and id not in (select id from 表 where name='c')

解决方案 »

  1.   

    slect distinct id from 表 where name <> 'c' and id not in (select id from 表 where name='c')
      

  2.   

    slect id,name from 表 where id not in (select id from 表 where name='c')
      

  3.   

    select id from 表名 where id <> ( select id from bbs where name = 'c' group by id ) group by id
      

  4.   

    slect id from 表 where id not in (select id from 表 where name='c')