0 Replies - 1015 Views - Last Post: 12 October 2014 - 08:58 AM

#1 rnty  Icon User is offline

  • D.I.C Regular

Reputation: 19
  • View blog
  • Posts: 264
  • Joined: 14-August 12

MCQ on NULL values in SQL

Posted 12 October 2014 - 08:58 AM

Please help me with the below question

In SQL relations can contain null values and comparison with null values are treated as unknown.Suppose all the comparison with null values are treated as false. Which of the following pairs is not equivalent.
option a
x=5
not(not(x=5))
option b
x=5
x>4 and x<6 where x is an integer
option c
x!=5
not(x=5)
option d
None of the above

So
option a
NULL=5 --> F
not(not(NULL=5)) --> F
They are equivalent

option b
NULL=5 --> F
??????

option c
NULL!=5 --> F
not(NULL=5) -->T

Thus © is the answer but I am not sure how option b is to be evaluated.

Please provide me with some hints

Thanks in advance

This post has been edited by rnty: 12 October 2014 - 09:02 AM


Is This A Good Question/Topic? 0
  • +

Page 1 of 1