我正进入(状态
ORA-00907: missing right parenthesis
对于以下查询:
SELECT PEOPLE.NAME FROM
CLIENTS K INNER JOIN PEOPLE ON K.ID_L = PEOPLE.ID_L
WHERE NOT EXISTS
(
(SELECT DISTINCT ARTIST.ID_U
FROM CLIENTS INNER JOIN ADORES ON CLIENTS.ID_L = ADORES.ID_L
INNER JOIN ARTIST ON ADORES.ID_U = ARTIST.ID_U
WHERE CLIENTS.ID_L = K.ID_L)
EXCEPT
(SELECT DISTINCT ARTIST.ID_U
FROM CLIENTS INNER JOIN BOUGHT ON CLIENTS.ID_L = BOUGHT.ID_L
INNER JOIN ARTWORK ON BOUGHT.ID_D = ARTWORK.ID_D
INNER JOIN ARTIST ON ARTWORK.ID_U = ARTIST.ID_U
WHERE CLIENTS.ID_L = K.ID_L)
)
我检查了两个子查询 - 都可以。如果我删除EXCEPT
运算符并且只使用一个子查询(但我需要实际测试两者是否相等),它会起作用。
知道问题是什么吗?