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

select distinct(empid),distinct(dept),name
from EMP


will the above query work?

Answer Posted / harsha

No, It will not work. SELECT DISTINCT works only for single
cloumn.

DISTINCT can be applied multiple times only when you want
to apply aggregate functions such as COUNT, AVG & SUM.
e.g.
SELECT COUNT(EMPNO)/COUNT(DISTINCT(WORKDEPT)), COUNT
(DISTINCT(JOB))
FROM DSN8810.EMP

Is This Answer Correct ?    14 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is db2 a mainframe?

1096


What is explain in db2?

1078


How to create backup table in db2?

1150


How is deadlock resolved?

1202


Mention the different locking levels that are available in db2.

1184


What is the result of open cursor statement?

1127


What is host variable in db2 cobol?

1135


What is ibm db2 client?

1006


What are db2 objects?

1089


Before you give the explain statement, what are the prerogatives?

1081


What is the function of logging in the db2 database?

1172


How do I optimize a query in db2?

1148


What is the use of value function?

1205


What is package in cobol db2?

1161


What is bufferpool in db2?

1097