+1 vote
154 views
Consider relational schema $R(A,B,C)$ and $S(A,B,C)$

$1)$ Select * from $R$ where $(A,B,C)$ in (Select * from $S$)

$2)$ Select * from $R$ where exists ( Select * from $S$ where R.A=S.A and R.B=S.B and R.C=S.C)

$3)$ Select * from R where $(A,B,C)$ not in((Select * from $R$ where $(A,B,C)$ not in)Select * from S)

Which of the following SQL expression equal to $R\cap S$?
| 154 views
+1
i think all of three are equal to R$\cap$S.
0
derive 3rd one
+1
SRESTHA MAM, third statement leads to (R-(R-S)) in set theory ===> R = ( ( R - S ) + ( R ∩ S ) )  ===> ( R  - ( R - S ) ) = ( R ∩ S )

Correct me if i done wrong,

by Boss (10.8k points)
selected by

1
2
3