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
How is deadlock resolved?
List out the three types of page locks that can be held.
How can we retrieve the total number of records in RPG & CLLE?
How do I optimize a query in db2?
Which component is responsible for processing sql statements and selecting access paths?
What types of tables are there in the db2 database?
What is db2 instance?
What are the benefits of using the db2 database?
How do I delete a table in db2?
Explain correlated sub-queries.
What is the picture clause of null indicator variable?
What is db2 look?
How to check sequence on a table in db2?
How to check last update on table in db2?
by using cursors , we can access particular records from the table based on some condition, i want to delete those selected records, how can we write a query for this in the program?