Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / venkat

SELECT EMPLOYEE-ID FROM EMPLOYEE GROUP BY EMPLOYEE-ID,DEPARTMENT HAVING COUNT( DEPARTMENT ) > 1;

Is This Answer Correct ?    0 Yes 2 No

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

Answer / karthik

select dept,empid , count(*)
from table
goup by dept,empid
having count(*) > 1

Is This Answer Correct ?    0 Yes 3 No

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

Answer / g.kameswara reddy

select employee_id from employee table where department in
('a1','a2','b1','b2');

Is This Answer Correct ?    7 Yes 11 No

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

Answer / prasenjit_in

Select emp_id from employee where dept IN (select all
dept from employee);

Is This Answer Correct ?    4 Yes 9 No

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

Answer / ab

Select emp_id from employee where dept IN (select DISTINCT
dept from employee);

Is This Answer Correct ?    2 Yes 8 No

Post New Answer

More DB2 Interview Questions

How do you retrieve the first 5 characters of firstname column of db2 table emp?

1 Answers  


how we will do null data selection in cobol-db2 program

2 Answers   Wipro,


How is the value function used?

0 Answers  


What is the difference between dbm cfg and db cfg file in db2 ?

0 Answers   MCN Solutions,


What technique is used to retrieve data from more than one table in a single SQL statement?

9 Answers   CTS, IBM, TCS,


When a COBOL-DB2 program in PRODUCTION is updating main tables and gone for long run, what have to do?

0 Answers   Broadridge,


why should we bind the DB2 program . What if we did not BIND a BD2 program ??

9 Answers   Infosys, TCS, Xansa,


What is db2 instance?

0 Answers  


What is difference between isnull and coalesce?

0 Answers  


Mention the various locks that are available in db2.

0 Answers  


Suppose there are many duplicate records in a Db2 table. What is the query to retrive only duplicate records?

4 Answers  


What's the maximum number of volumes that can be added to a STOGROUP?

1 Answers   IBM,


Categories