我得到了以下oracle-sql语句:
select xxx.a, xxx.b, xxx.c, xxx.d,
(SELECT e FROM ghj WHERE f in (SELECT u FROM hgz WHERE ddf = xxx.ddf limit
1)) AS fff
from fcv xxx where k = '100';
我收到以下错误:ORA-00907:缺少右括号ORA-06512:在“ SYS.DBMS_SQL”行1185 ORA-06512:在行1
为什么?
答案 0 :(得分:0)
关于注释,请删除该限制,因为它不是oracle语法
select xxx.a,
xxx.b,
xxx.c,
xxx.d,
(SELECT e FROM ghj WHERE f in (SELECT u FROM hgz WHERE ddf = xxx.ddf
FETCH FIRST 1 ROWS ONLY) FETCH FIRST 1 ROWS ONLY) AS fff
from fcv xxx
where k = '100';