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 |
When you should use a low fill factor?
What is a linked server in sql server?
How to create a simple stored procedure in ms sql server?
Can a unique index be created on a column, which contains null?
How to transfer Logins from SQL Server 2000 to 2005
What is the difference between varchar and varchar(max) datatypes?
Sql studio em braces a variety of capabilities, but will I need them all? Is there a simpler product ? : sql server management studio
What is live lock and deadlock? what is Lock escalation?
What is thr feature of change data capture?
Disadvantages of the indexes?
Differentiate between a primary key and a unique key.
What are various limitations of the views?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)