what is the out put of below queries?
a. select * from Emp where null = null;
b. select * from Emp where 1=1;
Answer Posted / jay vardhan singh
select * from Emp where null = null;
null can not be equal to null.So,Condition is not satisfied.
So,it will give only column name.
select * from Emp where 1=1;
1 is always equal to 1.So,Condition is satisfied ,So It
will give all data which is present in table.
| Is This Answer Correct ? | 23 Yes | 1 No |
Post New Answer View All Answers
what is an extended stored procedure? Can you instantiate a com object by using t-sql? : Sql server database administration
What are key, name and value columns of an attribute? : sql server analysis services, ssas
What are synonyms?
How many tables can be joined in SQL Server?
Can we return Data from 4(more than 1) tables in stored procedure?
What is the difference between functions and stored procedures?
Differentiate between mongodb vs. Sql server?
What is a recursive stored procedure in sql server?
Suppose we have a table "MyTable" containing 10 rows, what query should be executed to update the odd rows "Salary" as 9000?
How do you delete a data source?
What does it mean to invest in the index?
How to reaname table name without using sp_Rename in sql server..?
How can I create a new template for import ? : sql server management studio
can SSRS reports Cache results?
How to convert numeric values to integers in ms sql server?