Consider a table STU with schema STU(Regno, Name, DOB, Phone) and Regno as the primary key. Which of the following queries is equivalent to the query "SELECT * FROM stu WHERE Regno=1 AND Phone=2;" Choose all queries that are equivalent.
A. select * from stu where regno=1 and phone=(select phone from stu where phone=2 order by phone fetch first 1 rows only);
B. select * from stu where regno=1 and phone in (select phone from stu where phone=2);
C. select * from stu where regno=1 and phone in (1, 2);
D. select * from stu where phone=2 and regno in (1, 2, 3);
Answer:A
Consider a table STU with schema STU(Regno, Name, DOB, Phone) and Regno as the primary key. Which of the following queries is equivalent to the query "SELECT * FROM stu WHERE Regno=1 AND Phone=2;" Choose all queries that are equivalent.
A. select * from stu where regno=1 and phone=(select phone from stu where phone=2 order by phone fetch first 1 rows only); B. select * from stu where regno=1 and phone in (select phone from stu where phone=2); C. select * from stu where regno=1 and phone in (1, 2); D. select * from stu where phone=2 and regno in (1, 2, 3);