What is the result, when NULL is compared with NULL?

Answers were Sorted based on User's Feedback

What is the result, when NULL is compared with NULL?..

Answer / kmbkrishnan

if we check a Null value with another Null value as equal,
the result will be false.

 Is This Answer Correct ? 47 Yes 8 No

What is the result, when NULL is compared with NULL?..

Answer / anil kumar abbireddy

NOT EQUAL AND AGAIN ANSWER IS NULL

 Is This Answer Correct ? 14 Yes 2 No

What is the result, when NULL is compared with NULL?..

Answer / affan shemle

It is absolutely perfect to compare NULL with NULL. It
yields the result NULL. For those who are saying the result
is FALSE they are taking the answer from IF THEN ELSE. In
all the above answers supported by IF Statement there is a
catch. The result of IF is a Boolean. A Boolean can hold
TRUE, FALSE or NULL. So when you compare NULL vs NULL as a
condition of IF THEN, it returns NULL so the controller goes
to ELSE skipping the IF. Makes sense???
/
AFFAN SHEMLE

 Is This Answer Correct ? 13 Yes 1 No

What is the result, when NULL is compared with NULL?..

Answer / pavan_1981

i dont know how u can compare a null value with another
null value.i dont find any operator for doing that.

 Is This Answer Correct ? 15 Yes 6 No

What is the result, when NULL is compared with NULL?..

In oracle the below eg will help you to clear this:

DECLARE
D INTEGER :=NULL;
E INTEGER :=NULL;
BEGIN
IF (D = E) THEN
dbms_output.put_line('PASS);
ELSE
dbms_output.put_line('FAIL');
END IF;
END;

It will alwayz return FAIL.

 Is This Answer Correct ? 12 Yes 3 No

What is the result, when NULL is compared with NULL?..

Answer / talent pool

NULL Is An Unknown Value
So We Couldn't Compare it With Other One.This Is Pure
Correct Answer.

declare @d int
Set @d =null
declare @r int
Set @r=null
if @d=@r
Print 'Hi'
Else
Print 'Summa Vilayadatha'

 Is This Answer Correct ? 8 Yes 1 No

What is the result, when NULL is compared with NULL?..

Answer / a.jyothsna

One null value is not equal to another null value.

 Is This Answer Correct ? 7 Yes 1 No

What is the result, when NULL is compared with NULL?..

Answer / guest

The answer is NULL vs NULL = FALSE

 Is This Answer Correct ? 9 Yes 5 No

What is the result, when NULL is compared with NULL?..

Answer / kirankumar.vangeti

Null is neither equal to null nor it is not equal to null.
Any comparison to null is evaluated to null.

 Is This Answer Correct ? 3 Yes 0 No

What is the result, when NULL is compared with NULL?..

Answer / brahma

Null means unknown values, but do not compare both null
values

 Is This Answer Correct ? 2 Yes 0 No

More SQL PLSQL Interview Questions

How much does sql cost?

25.67,-1 Trunc = 20 Round= 30 HOW????

Create table emp (id number(9), name varchar2(20),salary number(9,2)); The table has 100 records after table created.Now i nee to change id's Datatype is to be Varchar2(15). now Alter table emp modify(id varchar2(15),name varchar2(20), salary number(9,2)); Whether it will work or returns error? post answer with explanation.

Can we use view in stored procedure?

What are all the different normalization?

What is the difference between an inner and outer join?

Can we use more than one null value for unique key?

If we update a complex view, is base table will get update ?

What is a sql select statement?

What are the two parts of design view?

What is query optimization in sql?

What is sqlcommand?

Categories