what is the output for this query
select * from employee where 1=1;

Answer Posted / soorai ganesh

This Query will return all records from employee table.

Infact insteadof this query u can use " select * from employee ".Because the condition 1=1 is always true.It never become as false.

Both of the Queries are same..........

Is This Answer Correct ?    20 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can group functions be mixed with non-group selection fields in ms sql server?

532


What is the full form of dql?

503


Explain what are partitioned views and distributed partitioned views?

575


What is the purpose of a table?

513


What is the difference function and stored procedure?

560






Give main differences between "Truncate" and "Delete".

573


What is difference between getdate and sysdatetime in sql server 2008?

596


How to concatenate two character strings together?

567


Differentiate between sql temp table vs table variable?

509


Is it safe to delete log files?

519


How to invoke a trigger on demand?

534


How can you insert null values in a column while inserting the data?

707


What is the difference between locking and multi-versioning?

525


List out the difference between union and union all in sql server?

515


How to remove duplicate rows from table except one?

564