关于查询的问题 表A 有以下字段:id(本机构标识) uperid(上级机构标识)其中根机构是没有上级机构的,或者说根机构即使设置了uperid(this_id),表A中也没有id=this_id的相关记录。对于查找表A中的根机构id,有没有什么好的办法。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select id from a where not exists(select 1 from a b where b.id = a.uperid); 完善一下: select id from a where a.uperid is null or not exists(select 1 from a b where b.id = a.uperid); 字段中有数字和字母 如何只选择数字 并作大小限定呢 RECORD和游标的问题 大侠们来给新手点帮助 在ODBC数据源管理器中提示:找不到 oracle 驱动程序的安装例程 java jdbc 查询oracle的视图,出现ORA-01861异常 没有主键的表,如何删除里面重复的数据?求助SQL?(续) oracle 10g用企业管理器怎么查看和编辑表中的内容啊 关于nvl 的问题 求教“从ORACLE的已有数据库导出含所有DDL的SQL语句文件”,请各位大虾帮忙。 关于oracle xml 的问题。 !!高分求救 Oracle触发器 新人求教11g监听程序问题
select id
from a
where a.uperid is null
or not exists(select 1 from a b where b.id = a.uperid);