What is the difference between WHERE AND IN?
OR
1. SELECT * FROM EMPLOYEE WHERE EMPID=123
2. SELECT * FROM EMPLOYEE WHERE EMPID IN (123)
WHAT IS THE DIFFERENCE?
Answers were Sorted based on User's Feedback
Answer / guest
Here both is same but some situvations we want extact value
of one are more values then use in oprate
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vandana chand
where allows only single value in where Clause.
where as IN operator allwos multiple values in Where clause.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vandana chand
where allows only single value in where Clause.
where as IN operator allwos multiple values in Where clause.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / ved
EMPID=123 will show only one row....if you want to see multiple row then use EMPID IN (1,2,3)
Pratically Done.
Is This Answer Correct ? | 3 Yes | 5 No |
What are the events recorded in a transaction log?
what is normalization? what is denormalization?
Define right outer join?
What is database isolation in sql server? : sql server database administration
What does <> symbol mean?
What are the different authentication modes in sql server?
What causes index fragmentation?
What is 2nf normalization form?
Explain about link server in sql server?
How to change server name in sql server?
What are the all different types of Joins in SQL Server 2000, Anybody can explain each join with definition..Thanks in advance....
9 Answers DELL, i Tech, Infosys, Siemens, TCS,
What are three ways you can use an identity value inside a trigger? Why would you prefer one way over another?