what is the out put of below queries?
a. select * from Emp where null = null;
b. select * from Emp where 1=1;

Answers were Sorted based on User's Feedback



what is the out put of below queries? a. select * from Emp where null = null; b. select * ..

Answer / poonam

First Query : will return all columns name without any data.
Second Query :will display all the records which are available in the table.bez Select* from emp where 1=1; the condition is true.

Is This Answer Correct ?    0 Yes 0 No

what is the out put of below queries? a. select * from Emp where null = null; b. select * ..

Answer / nitin yadav(nitin.yadav.india@

u can not compare two nulls

null means nothing.so
ANS 1:no row
ANS 2:All row (because of 1=1 is always true for all rows)

Is This Answer Correct ?    1 Yes 2 No

what is the out put of below queries? a. select * from Emp where null = null; b. select * ..

Answer / rohit

in first case it would response and it will show error and
in second case it will show object belonging to first row
and column

Is This Answer Correct ?    4 Yes 29 No

Post New Answer

More SQL Server Interview Questions

What is difference between unique and primary key?

0 Answers  


What xml support does the sql server extend?

0 Answers  


hi, may i know what is the command to get abstract the current month, current year and current day from a given date.i want these three in a isolated way..seperatedly is that any way in sql server 2000

3 Answers  


What do you understand by check constraint in sql server?

0 Answers  


How to get max 100 values from sql server

7 Answers  






What is subquery in sql?

0 Answers  


What is a group function explain with an example?

0 Answers  


What is the use of floor function in sql server?

0 Answers  


How do I start sql server 2016?

0 Answers  


When you first load SQL SERVER you will startup with what all databases?

3 Answers   CompuSol,


What are group functions in query statements in ms sql server?

0 Answers  


can you any body tell me the how to decrease the logfile

4 Answers  


Categories