select distinct name from table_name where stockk='600101'

解决方案 »

  1.   

    不好意思刚才看错了:
    select distinct name from tbname where stock='600101'
    and name not in(select name from tbname group by name having count(*)>1);
      

  2.   

    select name from gupiaotb where stock = '600101' 
    minus select name from gupiaotb where stock <> '600101';
      

  3.   

    select distinct name from tbname where stock='600101'and not exitst in(select name from tbname group by name having count(*)>1);
      

  4.   

    刚才写错了,把in去掉:
    select distinct name from tbname where stock='600101'and not exitst(select 'x' from tbname group by name having count(*)>1);
      

  5.   

    select NAME from tablename group by name having count(distinct STOCK) = 1
      

  6.   

    duanzilin(寻):如何体现“只买600101股票”的人?  
      

  7.   

    select name from gupiaotb where stock = '600101' 
    minus select name from gupiaotb where stock <> '600101';oracle 816 OK!
      

  8.   

    这样就可以体现“只买600101股票”的人了
    select NAME from tablename group by NAME having sum(decode(STOCK,'600101',0,1)) = 0