Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is difference between clustered and non clustered index?

1031


How we can compare two database data?

996


What is microsoft sql server?

1011


What is sharding?

116


Benefits of Stored Procedures?

1037


How do I uninstall sql server 2014?

985


what is a sub-report?

146


What is cte (common table expression)?

1085


What are actions, how many types of actions are there, explain with example? : sql server analysis services, ssas

1069


Explain the steps to use transact-sql cursor?

1153


What is difference between after and before?

1187


What do you mean by an execution plan? How would you view it?

958


What are the advantages of passing name-value pairs as parameters?

1215


What are the requirements for sql server 2016?

930


Explain relational data?

967