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 the contrast between sql and pl/sql?
How to copy the tables, schema and views from one sql server to another?
Explain what are magic tables in sql server?
I have triggers,views,functions,stored Procedures for a table. When I am dropping that table which objects are deleted?
What is the name of reporting services config file and what’s it’s used for?
What is the status of services on passive node for failover cluster in sql server? : sql server database administration
How to count groups returned with the group by clause in ms sql server?
Is profiler the only tool that has the ability to audit and identify ddl events? : sql server security
What are diverse clauses that form a part of sql?
What is sqlcmd?
How to list all user defined functions in the current database?
What is the difference between varchar and varchar(max) datatypes?
What are the main sources of data?
What are clustered and non-clustered index?
How to access the deleted record of an event?