按存在子查询排序

时间:2017-06-07 04:43:11

标签: sql oracle operator-precedence

当我执行下面的查询时,我给出了这个错误:

  

ORA-00907:缺少右括号

错误提示喜欢

select *
from image img, imageinfo info 
where
   img.i_id = info.i_id and
   (info.i_state like 'delete%' or
    exists (select * from back bk where rownum = 1 order by bk.b_date desc)
   )

1 个答案:

答案 0 :(得分:4)

从您的exists子句中删除order by子句