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...

use of IN/ANY/ALL

Answer Posted / bunty

IN - used to select multiple rows based on any of the key
provided

SQL - select distinct employeeid from orders where orderid
in ( select orderid from orderdetails where discount >= 10)


ANY - used in case of relational queries to compare result
with any of the key.

SQL - select custID from orders where regionID != "E" and
discount > any (select discount from orders where regionID
= "E" and discount > 3)

ALL - used in case of relational queries to compare result
with all of the keys.

SQL - select custID from orders where regionID != "E" and
discount > all (select discount from orders where regionID
= "E" and discount > 3)

Cheers -
Bunty

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many joins can you have in sql?

880


How to select 10 records from a table?

1096


Is sql harder than python?

1036


what is a constraint? Tell me about its various levels. : Sql dba

924


How do I clear the screen in sql plus?

979


What is informix sql?

917


What is the difference between delete and truncate statement in sql?

1008


Explain the the delete statements in sql?

976


What are character functions in sql?

891


Can you join a table to itself?

1029


How does pl sql work?

910


What is cursor and why it is required?

1105


how to rename an existing column in a table? : Sql dba

958


How much does a sql dba make? : SQL DBA

888


Can we use delete in merge statement?

999