what is the out put of below queries?
a. select * from Emp where null = null;
b. select * from Emp where 1=1;
Answer Posted / sailaja
Hi,
select * from EMP where null=null;
->null=null is always false so it gives 0 records.
if it is null is null then it fetches all the records in a
table..
select * from EMP where 1=1;
->it fetches all the records in a table
if it is select * from EMP where 1=2;
-->it fetches 0 records..
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is report rendering ?
you want to be sure that queries in a database always execute at the maximum possible speed. To achieve this goal you have created various indexes on tables which other statement will keep the database in good condition? : Sql server administration
What is the process of normalising?
What are the different types of upgrades that can be performed in sql server?
Which Model uses the SET concept
What is sql collation?
What is the difference between composite index and covering index?
What is the use of attributehierarchyvisible ? : sql server analysis services, ssas
What is function of ROLLUP ?
What are the different types of columns types constraints in the sql server?
Explain the categories of stored procedure?
What are indexes in ms sql server?
What is a table called, if it has neither cluster nor non-cluster index? What is it used for?
what is unique and xaml nonclustered index
What are scheduled tasks in sql server?