The Gateway to Computer Science Excellence
0 votes
105 views

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

in Databases by Active (2.3k points) | 105 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.

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,741 questions
57,253 answers
198,062 comments
104,700 users