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?

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


Please Help Members By Posting Answers For Below Questions

Which command is used to connect to a database in DB2 ? Give the Syntax.

1105


Which isolation level provides highest data integrity?

1126


What is ibm db2 connect?

1003


What is release/acquire in bind?

1110


How to access db2 tables in mainframe?

1057


Mention a credible reason why select* is never given preference in an sql program that has been embedded.

1201


How to restart a DB2 program?

1908


How do I change the column size in db2?

1158


I HAVE 500 ROW TO UPDATE I WOULD LIKE TO USE ROLLBACK ALONG WITH COMMIT.WHAT IS THE SYNTAX TO CODE COMMIT AND ROLLBACK FOR EVERY 100 ROWS.AND HOW THE CURSOR ROLLBACK TO THE LAST COMMITTING POINT.

3218


How can we read records for specific member in CL? AND rpg?

706


What is the difference between db2 and oracle?

1135


Define sqlca.

1118


How to compare data between two tables in db2?

1089


Explain the function done by data manager?

1284


What is a Foreign Key?

1102