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 is sql server 2000 work load governor?
How do I install only the client tools of sql server 2000?
what is the system function to get current user's user id? : Sql server database administration
What is the difference between dataadapter and datareader?
How to get the query of a table in sql server?
What is dbcc command in sql server?
What are key constraints?
Explain the difference between function and stored procedure?
wat new abt truncate in sql server
Can you use order by when defining a view?
What is the default Port No on which SQL Server listens?
What is the recovery model? List the types of recovery model available in sql server?