这样的SQL如何写? select distinct name from table_name where stockk='600101' 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不好意思刚才看错了:select distinct name from tbname where stock='600101'and name not in(select name from tbname group by name having count(*)>1); select name from gupiaotb where stock = '600101' minus select name from gupiaotb where stock <> '600101'; select distinct name from tbname where stock='600101'and not exitst in(select name from tbname group by name having count(*)>1); 刚才写错了,把in去掉:select distinct name from tbname where stock='600101'and not exitst(select 'x' from tbname group by name having count(*)>1); select NAME from tablename group by name having count(distinct STOCK) = 1 duanzilin(寻):如何体现“只买600101股票”的人? select name from gupiaotb where stock = '600101' minus select name from gupiaotb where stock <> '600101';oracle 816 OK! 这样就可以体现“只买600101股票”的人了select NAME from tablename group by NAME having sum(decode(STOCK,'600101',0,1)) = 0 在ORACLE里怎么让3个字段不能都相同 sql优化 帮忙写一SQL语句 各位大侠帮帮忙,有个过程出了问题,请高手指点,谢谢 关于通过oracle数据库传递附件的问题 Oracle后台进程在什么时候将日志缓冲区中的重做信息写入重做日志文件啊? oracle中新插入数据后总是要过一段时间才能查询出来 高分求助:TNS-12157 TNS:internal network communication error 多个表的外连接怎么写?急! 行转列问题,请老师指点,谢谢! ●日期类型如何索引?● 初学者的问题~~~
select distinct name from tbname where stock='600101'
and name not in(select name from tbname group by name having count(*)>1);
minus select name from gupiaotb where stock <> '600101';
select distinct name from tbname where stock='600101'and not exitst(select 'x' from tbname group by name having count(*)>1);
minus select name from gupiaotb where stock <> '600101';oracle 816 OK!
select NAME from tablename group by NAME having sum(decode(STOCK,'600101',0,1)) = 0