what is the out put of below queries?
a. select * from Emp where null = null;
b. select * from Emp where 1=1;
Answer Posted / jerry joseph
a. select * from Emp where null = null;
null = null will be always false.. so no rows returned..
change the query to "select * from Emp where null is null;"
to select all rows
b. select * from Emp where 1=1;
1 = 1 will be always true.. so all the rows are returned..
| Is This Answer Correct ? | 17 Yes | 1 No |
Post New Answer View All Answers
How to assign new column names in a view?
Why can there be only one clustered index and not more than one?
How to Improve the performencs of SQL Server 2005 exclude stored Procedure and Indexes?
What are the different types of Indexes available in SQL Server?
What is replication and database mirroring?
What are the reporting services components?
How to use old values to define new values in update statements in ms sql server?
What does REVERT do in SQL Server 2005?
How will you find out if there are expensive SQL statements running or not?
How to drop an existing schema in ms sql server?
What is indexing explain it with an example?
Can two tables share a primary key?
What do we need queues in sql service broker?
What are magic tables in sql server?
When you use @@error and try-catch?