表A
ID          NO
1           1
2           1
3           2
4           3
5           4
6           4
 查询表A中NO只出现一次的Id

解决方案 »

  1.   

    select ID from A gruop by NO having count(NO)=1
      

  2.   

    原来是用sql  还以为是要写代码呢
      

  3.   

    select ID from A gruop by NO having count(NO)=1  这个可以!
      

  4.   

    select ID from A group by NO having count(NO)=1
      

  5.   

    select ID from A where NO in (select NO from A group by NO having count(NO) = 1)
      

  6.   


    select ID from A group by NO having count(NO)=1
      

  7.   

    select ID from A group by NO having count(NO)=1
    有错吧
      

  8.   

    正解:
    CREATE TABLE TT(ID NUMBER,
    NO NUMBER);SELECT ID FROM TT WHERE NO IN(
    SELECT no FROM TT GROUP BY NO HAVING COUNT(NO)=1);
      

  9.   

    用SQL语句啊,就像1#说的就是啊
      

  10.   

        应该为"group"  O(∩_∩)O~
      

  11.   

    select ID,no into #yy from  a where no=1
    select * from #yy
    drop table #yy
      

  12.   

    感觉sql语句自己还很差//.............