search
Log In
0 votes
147 views

a) 0    b) 1      c) 2        d) 3

in Databases 147 views
1

option d :-  3

0
@shaik Masthan, Does NOT IN connective on empty set returns TRUE? please elaborate
1

as per my knowledge yes.

 

take each row, and evaluate.

what happens NOT IN is replaced by IN operator?

first tuple from A, (12,A,60) taken, condition age IN ( some values )

if age = value1 or age = value2 or age = value3 or ........ then return true.

 

what happens in case of NOT IN

if age ≠ value1 and age ≠ value2 and age ≠ value3 and ........ then return true.

yes my value is not matched by any value (in case of empty table also) ===> return true.

 

for confirmation i run it on W3 Schools.com also.

 

NOT IN (EMPTY TABLE)  ====> always true.

IN (EMPTY TABLE) ====> always false.
0

yes my value is not matched by any value (in case of empty table also) ===> return true.

 That explains it beautifully...Thanks a lot brother :)

0
can you tell me what happen when i replace NOTIN by EXCEPT is it 3???
0

EXCEPT

is a SET operator, you can't apply it here.

 

i hope you want to know

(Set1) except (Set2)

1) if Set2 is empty, then result is Set1

2) if Set1 is empty, then result is empty

0
got it.i forget the basic concept.thnx

Please log in or register to answer this question.

Related questions

2 votes
0 answers
1
318 views
How to solve this?
asked Jan 18, 2018 in Databases Shubham Kumar Gupta 318 views
0 votes
0 answers
2
239 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 239 views
0 votes
0 answers
3
109 views
Suppose there are two tuples in Animals relation with different IDs but of same type and in Adoption table there is a tuple with an ID that matches with the ID of first tuple in Animal relation. AND during the query evaluation, the type of first tuple of the animal relation ... same type are also present in Adoption table . but the thing is given answer is also wrong here. Correct me if i'm wrong.
asked Dec 20, 2018 in Databases Ashwani Yadav 109 views
0 votes
2 answers
4
185 views asked Jul 14, 2018 in Databases Na462 185 views
...