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
Explain stored procedure?
Why do we use stored procedures in sql server?
how you can move data or databases between servers and databases in sql server? : Sql server administration
What is 3nf normalization?
How to handle error or exception in sql?
what is the different types of backups available in sql server? : Sql server database administration
How do I find sql server instance name?
What command is used to delete a table from the database in the sql server and how?
What is the process of normalising?
how would you troubleshoot blocking? : Sql server database administration
What is BLOCK statements in SQL?
How to retrieve error messages using odbc_errormsg()?
What is the purpose of update statistics and scope_identity() function?
Define outer join?
What do you mean by recursive stored procedure?