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 the difference between UNION and UNIONALL?
what is a major difference between sql server 6.5 and 7.0 platform wise? : Sql server database administration
List the ways in which dynamic sql can be executed?
What is conditional split?
Define cursor locking
What is wide table?
Explain indexed views?
What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting is possible?
How to find related tables in sql server?
Does sql server 2016 have ssms?
What is difference between Datepart() and Datename() in SqlServer?
What does set rowcount do?
code to create procedure for taking databse backup in sql server or i have the query for it but what it's query returns means i want to show on my jsp that the databse backup has been taken on the basis of that return value.does it returns 0 or 1.wat is the code for that
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 Federation and Federation Member?