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

what is replication? where do u use Go Keyword?

1 Answers   Satyam,


What are four major operators that can be used to combine conditions on a where clause?

0 Answers  


What is CTE in SQL

0 Answers   Infosys,


How to select all columns of all rows from a table with a select statement in ms sql server?

0 Answers  


Mention the different authentication modes in sql server.

0 Answers  






Define right outer join in sql server joins?

0 Answers  


Write a stored procedure for emplpoyee and department table to get DeptName which having no employee. Table Structure- Emp-Emp_Id,Emp_Name,Dept_id Dept-Dept_Id,Dept_Name

7 Answers   TCS,


What is data compression?

0 Answers  


What are statistics?

0 Answers  


How sql server executes a statement with nested subqueries?

0 Answers  


What is sql server 2000 work load governor?

0 Answers  


What is wide table?

0 Answers  


Categories