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

How will you monitor replication latency in transactional replication? : sql server replication

0 Answers  


What is after dml trigger?

0 Answers  


What's new in sql management studio for sql server? : sql server management studio

0 Answers  


How to Handle the exceptions in Sqlsrver 2005??

3 Answers   Value Labs, Wipro,


How to run sql server 2005 books online on your local system?

0 Answers  






how many instance use in sql server 2005

4 Answers   EFI, HCL,


What are tables in sql server?

0 Answers  


How to use values from other tables in update statements in ms sql server?

0 Answers  


What's the difference between a primary key and a unique key?

4 Answers  


What is the difference between the application object and session object?

0 Answers  


What is tabulation?

0 Answers  


How to list all dsn entries on your local machine using odbc_data_source()?

0 Answers  


Categories