- 07/12/2019 at 9:58 pm #1427692EduGorillaKeymasterSelect Question Language :
Consider the relation Enrolled (SID,CID) in which (Sid,Cid) is the primary key, and the relation paid(Sid,amount) where Sid is the primary key. Assume no null values and no foreign keys or integrity constraints.
Query 1 : Select Sid from Enrolled where Sid in (Select Sid from paid)
Query 2 : Select Sid from paid where Sid in (Select Sid from Enrolled)
Query 3 : Select E.Sid from Enrolled E , paid P where E.Sid= P.Side
Query 4 : Select Sid from Paid where exists (Select * from Enrolled where enrolled.Sid = Paid.Sid)
Which one of the following statement is correct ?
Post your Training /Course EnquiryAre You looking institutes / coaching center for
- All queries return identical row sets for any database
- Query 2 and Query 4 return identical row sets for all databases but there exist databases for which Query 1 and Query 2 return different row sets
- There exist databases for which Query 3 returns strictly fewer rows than Query 2
- There exists databases for which Query 4 will encounter an integrity violation at run time
- IIT-JEE, NEET, CAT
- Bank PO, SSC, Railways
- Study Abroad