IN Vs OR operator which is best to use sql server.
Answer Posted / harinireddy
in is peferable bcoz
by using in we can write set of values at time n check it
where as when we use or we need to mention for each n every
value
like ...
select emp_id from employee where emp_id in(1,2,3,4..)
but in case of or...
select emp_id from employee where emp_id=1 or emp_id=2 or
emp_id=3 or emp_id=4...
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
What is an index in a database?
How to insert multiple rows with one insert statement in ms sql server?
What is the purpose of the master database?
How to enter unicode character string literals in ms sql server?
Describe how to use linked server?
Where views are stored in sql server?
Explain about link server in sql server?
What are the differences between sql server and mysql.
How to delete duplicate rows from table except one?
Write a Select Query to display title for each group of records, which are collected with Compute Clause? Like titlefield column-A column-B ..... ..... ..... Sum ... titlefield column-A column-B ..... ..... ..... Sum ...
What the different components of Replication and what is their use?
Explain what is meant by replication of database?
What are the advantages of using stored procedures?
What is the difference between count () and rowcount ()?
What are xml indexes?