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
How to rename a table in DB2 ?
What is a page in db2?
What is alias in db2?
Explain about rct in db2?
Is it possible using max on a char column?
What is db2 and what is the use of db2 optimizer?
How can the firstname and the lastname from the emp table be concatenated to generate complete names?
In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?
How can you validate Sql errors during cursor operation in db2 pgms and where do you code?
How is the value function used?
What are the uses of db2 optimizer?
What is rct?
Can we delete records from view?
SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD CHAR, TOKEN KEY was expected
What is the difference between plan and package in db2?