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
What is the difference between spufi and qmf?
What is a buffer in memory?
Explain the function of data manager.
What is view db2?
What is cloudant database?
What is the latest version of ibm db2?
How to find schema of a table in db2?
What is a page in db2?
What is buffer pool and list some of them?
What is the syntax for creating a table in the db2 database?
What is null indicator in cobol db2?
How do I add a column in db2?
How do you pull up a query which was previously saved in qmf?
What is the syntax for FETCH in DB2 ?
Is the primary key a clustered index?