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
What languages bi uses to achieve the goal?
How do you delete a data source?
How to start and end transact-sql statements?
Explain a differential backup?
What stored by the model?
What is create command?
How to create a simple user defined function in ms sql server?
If we delete pack Spec what will be the status of pack Body ?
How to delete existing rows in a table?
Where is my database stored on the hard disk in ms sql server?
Why are you getting errors when creating a new odbc dsn?
How to write a query with a right outer join in ms sql server?
Why use identity in sql server?
How to drop an existing table?
What are the differences between having and where clause.