What will be the result of the following query? [code] (select studentid from student where section = 'c') except (select studentid from

What will be the result of the following query?
Code:
(select studentid
from student 
where section = 'c')
except
(select studentid
from student
where roll <10);
A. All the values of the studentid for which section is c and roll < 10
B. All the values of the studentid for which section is c and roll > 10
C. All the values of the studentid for which section not c and roll < 10
D. All the values of the studentid for which section not c and roll > 10
 
Answer: b
Explanation: The except operation excludes all the tuples that are present in the result of the second query from the result of the first query. It also excludes all duplicates from the relation.
 

Tìm kiếm

Back
Top