如何更改此代码以查看结果中的A列和D列?
SQL> SELECT A FROM R WHERE EXISTS
(SELECT D FROM S WHERE S.D=R.A AND S.C=R.B);
结果:
A
----------
1
答案 0 :(得分:4)
Select
A, D
From
R
Inner Join
S
On S.D = R.A And S.C = R.B
答案 1 :(得分:1)
SELECT R.A, S.D
FROM R
INNER JOIN S ON S.D = R.A AND S.C = R.B