605 views
0 votes
0 votes
Consider the following ORACLE relations:

One (x, y) = {<2, 5>, <1, 6>, <1, 6>, <1, 6>, <4, 8>, <4, 8>}

Two (x, y) = {<2, 55>, <1, 1>, <4, 4>, <1, 6>, <4, 8>, <4, 8>, <9, 9>, <1, 6>}

Consider the following two SQL queries SQ1 and SQ2 :

SQ1: SELECT * FROM One) EXCEPT (SELECT * FROM Two);

SQ2: SELECT * FROM One EXCEPT ALL (SELECT * FROM Two);

For each of the SQL queries, what is the cardinality (number of rows) of the result obtained when applied to the instances above ?

A – 2 and 2 respectively

B – 2 and 1 respectively

C – 1 and 2 respectively

D – 1 and 1 respectively

Please log in or register to answer this question.

Related questions

1 votes
1 votes
1 answer
1
Shubhanshu asked Dec 24, 2018
1,260 views
According to me it should be – “Retrieve the names of all students with a lower rank, than all students with age < 18 ”
0 votes
0 votes
1 answer
2
Shivani gaikawad asked Nov 3, 2018
646 views
i don't know the actual answer for the questionaccording to me answer should be A please confirm it
0 votes
0 votes
0 answers
3
Tuhin Dutta asked Dec 15, 2017
399 views
Student tableROLLNONAMEMARKS1MARKS21T50302S70993DNULL10NULLNULL78NULLNULLNULLNULLNULLa) select count(MARKS1) from student;b) select count(*) from student;