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 is cursor stability in db2?

1354


What is the result of open cursor statement?

1080


How can you quickly find out the # of rows updated after an update statement?

1036


In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?

1101


What is host variable?

1053


what are bind concepts in db2 cobol?

1090


What are the bind parameters ibm db2?

1046


What is coalesce in db2?

1129


Who uses db2?

1034


What are foreign keys in db2?

1101


What are the different types of base tables?

1089


What is the difference between db2 and oracle?

1125


How can record locking be achieved in those DB2 versions which do not support it?

1073


Explain about mirror activator disk mirroring?

1004


What are packages in db2?

1019