这样的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 11G RAC 安装蓝屏报错,能远程最好~ Oracle存储过程,希望有高手解答下 update 效率及优化问题 Pro*c获取UPDATE或INSERT影响条数 请教个问题? PL/SQL 表的所有字段比较 求一条SQL语句 触发器编译时提示“触发器中不能包含LONG型字段“,但确实没有定义和指向这种类型的字段 oracle816支持内连接吗? 请了先!请问如何彻底的删除ORACLE 816?? 谢谢了 ●日期类型如何索引?● 初学者的问题~~~
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