In a single table,How to retrieve a employee-id of an
employee who works in more than one department?
Answer Posted / millar
select employee_id,department_id from emp where employee_id in(select employee_id from emp where department_id in (select distinct
department_id from emp) group by employee_id,department_id having count(*) >1);
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Define db2.
Which component is responsible for db2 startup and shutdown?
Comment whether the cursor is closed during commit or not.
What is explain in db2?
Why cursor is used in db2?
How can the duplicate values be eliminated from db2 select?
How to run db2 command in windows?
What are db2 tables?
What is view db2?
What is db2 catalog database?
What is the difference between "db2ilist" and "db2 get instance" commands in DB2 Database Server?
Where can you declare a cursor in a cobol-db2 program?
What is alias in db2?
How do you concatenate the firstname and lastname from emp table to give a complete name?
What is runstats utility in db2?