in Databases edited by
722 views
1 vote
1 vote

Consider the following instance R.

A 1 2 3 4
B Null 1 2 2

The number of tuples returned by the following SQL query is _____________.
> select * from R as R1
   where not exists (select * from R)  where B = R1.A                          

in Databases edited by
722 views

4 Comments

yes undefined ....

let comparison is like this....

any Number =NULL (here we r not sure about the value of NULL therefor False)

Number>NULL(again we r not sure about the value of NULL therefor False)

Number<NULL(again we r not sure about the value of NULL therefor False).....

therefor we say that the comparison with NULL gives undefine ...

0
0
Then NOT exist (undefined) will not return any rows
0
0
I think the answer should be 2 as the two tuples with A as 3 and 4 should be returned as they do not have an equivalent value in B.
0
0

1 Answer

0 votes
0 votes
there is a mistake in parathezisation...it will be 2

Related questions

0 votes
0 votes
1 answer
2