select distinct(empid),distinct(dept),name
from EMP
will the above query work?
Submitted by: AdministratorNo, 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
Submitted by: Administrator
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
Submitted by: Administrator
Read Online IBM MainFrame Job Interview Questions And Answers
Top IBM MainFrame Questions
☺ | How do define Dynamic array in COBOL how do u define single dimensional array and multidimensional array in your COBOL? |
☺ | Can 88 level variable be declared in FD section? |
☺ | What is difference b/w file-aid tool and file-aid utility? |
☺ | How to handle -911 (deadlock) error in a db2 program so that the program will never abend? |
☺ | Suppose I have 1000 rows in a db2 table. I want to update first 100 records, How do I do it? |
Top Mainframe Technical Categories
☺ | IBM MainFrame Interview Questions. |
☺ | IBM AS400 Interview Questions. |
☺ | JCL Interview Questions. |
☺ | IMS DB Interview Questions. |
☺ | CICS Interview Questions. |