search
Log In
0 votes
189 views
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
in Operating System 189 views
0
EXCEPT will return <2,5> and

EXCEPT ALL will return <2,5>,<1,6>(it returns the exact difference of duplicate rows).
0

@Shubhgupta Please explain in detail.

0
C ??
0

@kumar.dilip C is the correct answer. Can u please explain in detail?

0

Please log in or register to answer this question.

Related questions

0 votes
1 answer
1
384 views
According to me it should be – “Retrieve the names of all students with a lower rank, than all students with age < 18 ”
asked Dec 24, 2018 in Databases Shubhanshu 384 views
0 votes
1 answer
2
207 views
i don't know the actual answer for the question according to me answer should be A please confirm it
asked Nov 3, 2018 in Databases Shivani gaikawad 207 views
0 votes
0 answers
3
173 views
Student table ROLLNO NAME MARKS1 MARKS2 1 T 50 30 2 S 70 99 3 D NULL 10 NULL NULL 78 NULL NULL NULL NULL NULL a) select count(MARKS1) from student; b) select count(*) from student;
asked Dec 15, 2017 in Databases Tuhin Dutta 173 views
1 vote
3 answers
4
316 views
Class(name, meets_at, room, fid) Faculty(fid, fname, deptid) Find the names of faculty members who teach in every room in which some class is taught
asked May 18, 2019 in Databases aditi19 316 views
...