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

Explain what are commit and rollback in sql?

0 Answers  


Explain the difference between functions and stored procedures in sql server?

0 Answers  


Your company has 50 branches all over the country all the branches, including the head office have sql server as the database every night all 50 branches upload certain information to the head office which replication topology is best suited for the above scenario?

0 Answers  


How to Update from select query in sql server?

0 Answers  


What are scalar functions?

0 Answers  






If I delete a template from the list in sql studio, will it be deleted from the hard disk? : sql server management studio

0 Answers  


What is the default fill factor value?

0 Answers  


How to create new tables with "create table" statements in ms sql server?

0 Answers  


Explain about Normalization?

0 Answers   Infosys,


What do you mean by tablesample?

0 Answers  


Which database stores information about replication?

0 Answers  


What to check if a User database is locked?

0 Answers   TCS,


Categories