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
How to execute stored procedure in select statement sql server?
What is index, cluster index and nonclustered index?
What are different types of join?
What are the types of joins in sql?
What is instead of trigger sql server?
How to sort the query output with order by clauses in ms sql server?
How to get nth highest salary from employee table.
Why do we partition data?
What are different types of constraints?
How do I find query history in sql server?
What is pivot and unpivot?
What is the importance of concurrency control?
How to change server name in sql server?
When to use null data driven subscription?
Can you explain important index characteristics?