CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Consider the relation R(A, B) in which (AB) is the primary key and the relations S(A, C) where A is the primary key. Assume there are no null values and no foreign keys or integrity constraints.
Q1: Select A from R where A in (Select A from S)
Q2 : Select A from S where A in (Select A from R)

Which of the following option is correct related to the above queries?

A
Both Q1 and Q2 gives same result.
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
None of these
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
Both Q1 and Q2 may gives same result.
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
Both Q1 and Q2 gives different result.
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C Both Q1 and Q2 may gives same result.
For the same values unique for the column A in tables R and S.
Q1 and Q2 will give the same output.

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Neighbourhood Shops
CIVICS
Watch in App
Join BYJU'S Learning Program
CrossIcon