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 much does sql server 2016 cost?
Is it possible to run multiple publications and different type of publications from the same distribution database? : sql server replication
How to rename an existing column with the "sp_rename" stored procedure in ms sql server?
How to transfer data from a cursor to variables with a "fetch" statement?
What do you mean by an execution plan? Why is it used? How would you view it?
Explain the microsoft sql server delete command? : SQL Server Architecture
How do I install sql server?
Do you know what is blocking?
How can you control the amount of free space in your index pages?
what exactly sql injuction.how to overcome.....
1.what are diff types of joins , and explain diff between cross join and full outer join 2.diff types of views 3. Diff types of index 4. What is diff b/w stores procedure and function procedure 5.diff between double and int in SQL 6.diff between char and varchar in SQL. 7.Oracle or SQL whice you will preferred and why.
How many types of functions are there in sql server?
How to change a login name in ms sql server?
How to count rows with the count(*) function in ms sql server?
What are the different types of join?