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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / amit kumar

here...retrieve all column and records of employee. and
there is condition 1 = 1 is always true if 1 value in any
column.

Is This Answer Correct ?    7 Yes 0 No

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

Answer / mohanakrishna

The querry display the total table information present in
the database.

EID ENAME MID
101 rama null
102 sita 101
103 siva 101
104 ganesh 103

Is This Answer Correct ?    5 Yes 1 No

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

Answer / guest

Retriving all employee table records

Is This Answer Correct ?    5 Yes 3 No

Post New Answer

More SQL Server Interview Questions

Define left outer join in sql server joins?

0 Answers  


What are different types of views?

0 Answers  


How to loop through returning rows?

0 Answers  


Consider the table T1 it consits A,2,3,4 consider another table t2 it contain 1,2a,3a,4a now i need o get the upadted answer

3 Answers  


A trigger can reference objects outside the current database? State true or false.

0 Answers  






What is an indexing technique?

0 Answers  


How to store pdf file in sql server?

1 Answers   CarrizalSoft Technologies, College School Exams Tests, TATA,


Explain the steps to use transact-sql cursor?

0 Answers  


what is the primary use of the model database? : Sql server administration

0 Answers  


What is sub-query in sql server?

0 Answers  


What is the difference between sql server 2000 object owner and sql server 2005 schema? : sql server database administration

0 Answers  


An employee table, with the columns id, name, sal and dob. Query to select emp names of all highest salaries(there are 4-5 people having the same salary which happens to be the highest).

9 Answers   ADP,


Categories