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

How to view db2 table structure?

690


What is host variable in db2 cobol?

713


Why select is not preferred in embedded sql programs?

822


How to connect to db2 database from windows command line?

656


What does db2 blu stand for?

764






Hello All, We have requirment to Replace BMC Db2 Load product thru CA FAST LOADPlus product. Do anyone have JCL to for FAST LOADPLUS and what all are thing need to take in consideration.

2419


What is null value in db2?

658


What types of tables are there in the db2 database?

659


Name the various locking levels available?

713


SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD CHAR, TOKEN KEY was expected

11180


What are bind parameters in db2?

699


What are packages in db2?

689


If the cursor is kept open followed the issuing of commit, what is the procedure to leave the cursor that way?

804


What is the latest version of ibm db2?

828


What is with ur in db2?

886