Consider the table STUDENT (Sid, Sname, Dept, Rank). Which of the following two queries gives the Sid whose Rank is less than anyone in the CSE department?

Q1: SELECT  s1.Sid

       FROM STUDENT s1

       WHERE NOT EXISTS (SELECT  *

                                      FROM  STUDENT s2

                                      WHERE s2.Dept = 'CSE' and s2.Rank <=s1.Rank)        
Q2: SELECT  s1.Sid
       FROM STUDENT s1
       WHERE s1.Rank < Any (SELECT  distinct Rank

                             FROM  STUDENT s2

                             WHERE s2.Dept = 'CSE')

1

Q1

2

Q2

3

Both

4

Neither Q1 nor Q2

5
Question Not Attempted

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation