The Gateway to Computer Science Excellence
+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$?
in Databases by Veteran (119k points) | 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 )

1 Answer

+3 votes
Best answer

Correct me if i done wrong,

by Boss (10.8k points)
selected by
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,370 answers
198,506 comments
105,272 users