在视图或者子查询中查询rowid出错提示cannot select ROWID from a join view without a key-preserved table
比如
select * from ( select row_.*, rownum rownum_,rowid rowid_ from ( select t.*,u.user_companyname uname,u.user_mobile umobile,ceil((sysdate - fzrq)*24) as OVERTIME from vc_apply t,vc_user u,vc_cl v where 1=1 and (t.apply_newwzhgzbh=v.zchgzbh and APPLY_RESULT = 1) and t.apply_userid = u.userid order by APPLY_DATE ) row_ where rownum <= 70) where rownum_ > 0
原因,是因为子查询中查询出的记录不能保证唯一性,所以无法确认ROWID
解决方法:检查条件,看是否查询条件查询出的记录唯一,如果不是唯一的,试试在使用到的列上建立唯一索引或主键。