Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 / pravin

It is not possible to compare two nulls with each other.
Still if we want to compare null then we have isnull
operator.

Is This Answer Correct ?    4 Yes 5 No

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

Answer / gaurav arora

The answer-6 is quite matching with my stuff. Let me clear
it in more writting:
1. When we compare two nulls then the result
always 'false'. The main reason is the null is not a value
its neither an empty nor a empty space, so the actual
result is null which places as null.
2. When we compare a null with another which has some value
like some int value then the result is false. The actual
result is false and not null.

Consider the following examples:

--null = null is null which is false
Declare @intNull1 int
Set @intNull1 =null
Declare @intNull2 int
Set @intNull2=null
If @intNull1=@intNull2
Print 'null = null is true'
Else
Print 'null = null is false'

--Now assign some value
Set @intNull1 = 1
If @intNull1=@intNull2
Print 'null = int value is true'
Else
Print 'null = int value is false'

Thanks,
Gaurav Arora
http://stuff4mdesktop.blogspot.com/

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More SQL PLSQL Interview Questions

what is variable in package specification

3 Answers  


What is cte?

0 Answers  


How can i insert data inro a table with 3 columns using FORALL?

2 Answers   Oracle,


What is numeric function sql?

0 Answers  


What is function and procedure?

0 Answers  


What is sql stand for?

0 Answers  


What is procedure explain with program?

0 Answers  


What are the different dml commands in sql?

0 Answers  


What is cross join sql?

0 Answers  


Is sql port 1433 encrypted?

0 Answers  


What is a temp table?

0 Answers  


What are the sql aggregate functions?

0 Answers  


Categories