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

What kind of database is db2?

974


Where can you declare a cursor in a cobol-db2 program?

994


What action db2 takes when a program aborts in the middle of a transaction?

1087


What is cursor stability in db2?

1276


What is a collection in db2?

982


What is reorg and runstats in db2?

1142


Define declaration generator (dclgen).

1066


What is a db2 tablespace?

998


Explain about open switch business continuity software?

1072


What is image copy in db2?

943


What is dbrm? When it will be created?

956


What is collection in db2 bind?

960


What is bind plan?

978


What is the use of commit in db2?

1000


What is deadlock in db2?

1015