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 host variable?
What is buffer pool?
Can one database have multiple instances?
Can we update view in db2?
What is with ur in db2?
How can the firstname and the lastname from the emp table be concatenated to generate complete names?
What is an instance database?
can all users have the privilage to use the sql statement select * (dml)?
What do you mean by rollback?
How to view db2 table structure?
What kind of database is db2?
List some fields from sqlca?
What is cascading rollback?
What type of database is db2?
How would you find out the total number of rows in a db2 table?