Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Mainframe Technical Interviews:CICSCLIST (Command List)IBM ADABASIBM AS400IBM AssemblerIBM COBOL400IBM COOLPLEXIBM DB400IBM MainFrameIBM MVSIBM NaturalIBM OS 2IBM OS390IBM QMFIBM QSAMIBM REXXIBM RPG400IBM SysplexIDMSIMS DBJCLMQ SeriesVSAM
Copyright © 2018. All Rights Reserved
IBM MainFrame Interview Question:
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
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.