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

How will you add a dimension to cube? : sql server analysis services, ssas

1086


What happens if null values are involved in bitwise operations?

1029


Can primary key be a foreign key?

1058


What are the different types of replication you can set up in sql server?

1052


What are the general features of sql server management studio? : sql server management studio

1077


How many non clustered indexes there can be on table ?

920


Differentiate between delete and truncate.

1062


What is the purpose of optimization?

998


What is mapping schema?

1028


What do you mean by a dependent functionality in a build?

1154


What is buffer cash in sql server?

1154


What is the difference between NOROW and LOCKROW?

2840


What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?

1004


How to create median function?

164


Do you know what guidelines should be followed to help minimize deadlocks?

970