In a single table,How to retrieve a employee-id of an
employee who works in more than one department?

Answer Posted / manikandan.d

hi all i hope this answer will help you


emp
eid ename dep
001 manikandan mainframe
002 karthi java
003 jarin mainframe
001 manikandan java
003 jarin testing
004 hariharan java
001 manikandan testing

select eid from emp e1 where 1 <

(select count(*) from emp e2 where e1.eid=e2.eid)

let me know if any new answer

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is null in db2?

575


What is dpf in db2?

664


What is page size in db2?

563


What is the latest version of ibm db2?

737


Mention data types used in db2 ?

677






What is the use of predicate?

586


What is a collection in db2?

579


What is db2 connect?

607


What is bind and rebind in db2?

648


What is buffer pool?

613


How can you quickly find out the # of rows updated after an update statement?

632


What is the purpose of rollback and commit?

595


What are packages in db2?

597


What is db2 command?

585


How to take backup of table in db2?

601