In a single table,How to retrieve a employee-id of an
employee who works in more than one department?
Answer Posted / anonymous
select emp_id from employee where dept in (select distinct
dept from employee) group by emp_id having count(*) >1;
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What is difference between isnull and coalesce?
How can record locking be achieved in those DB2 versions which do not support it?
What are the contents of dclgen?
What does reorg do in db2?
What action db2 takes when a program aborts in the middle of a transaction?
Is it possible to create an Instance in DB2 using DB2 Control Center ?
Which is faster delete or truncate?
What is db2 plan table?
How do I add a column in db2?
How do I optimize a query in db2?
I understand Join always perform better than subqueries. Then what is the advantage/use of Subqueries/correlated subqueries etc.,in DB2 programming.Please explain.
What does runstats do in db2?
What is the purpose of using commit?
What is bind plan?
Differentiate between cs and rr isolation levels? Where do you specify them?