如题:在执行下面的查询时出错,不明原因!
select *
from tb a
where not exists(select 1 from tb b where b.id =a.id and b.rowid <a.rowid);ORA-01446: 无法使用distinct, group by 等子句从试图中选择rowid或采样.
select *
from tb a
where not exists(select 1 from tb b where b.id =a.id and b.rowid <a.rowid);ORA-01446: 无法使用distinct, group by 等子句从试图中选择rowid或采样.
and b.rowid <a.rowid 这里有什么问题呢 。。
但看了下错误类型:
ORA-01446 cannot select ROWID from view with DISTINCT, GROUP BY, etc. A SELECT statement attempted to select ROWIDs from a view containing columns derived from functions or expressions. Because the rows selected in the view do not correspond to underlying physical records, no ROWIDs can be returned. 看看,对LZ还有帮助。