Q1.all the depts which has more then 10 empls?
Q2.all the dept which does not have any emply?
Q3 all the emp which does not have any dept?
Q4 get all the emply detais with the dept details it dept is
exit otherwise any emp details?
Q5 how to debugg the dynamic sql and packages?











Answer Posted / girija shankar dash

ANS-2:

SELECT department_id,COUNT(employee_id) AS "NO. OF EMPLOYEES"
FROM employees
GROUP BY department_id
HAVING COUNT(employee_id) = 0;

DEPARTMENT_ID NO. OF EMPLOYEES
201 0
311 0

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain dml and ddl?

548


How many joins can you have in sql?

517


Which command is used to call a stored procedure?

499


What is the difference between nested table and varray?

516


what are the nonstandard string types? : Sql dba

601






What is a design view?

518


C. Normalize the following data up to the 3rd Normal form. Create the tables and insert the data given. Emp_ID Name Dept_Name Salary Course_Title Date_Completed 100 Adam Marketing 48,000 SPSS 6/19/2008 Surveys 10/7/2008 140 Bob Accounting 52,000 Tax Acc 12/8/2008 110 Cathy IT SQL Server 1/12/2008 C# 4/22/2008 190 Dan Finance 150 Emily Marketing 55,000 SPSS 6/16/2008 42,000 Analysis 8/12/2008 Queries 1. Find all Names who have completed the SPSS Course. 2. Find employee with max salary. 3. Find employee with 2nd max salary. 4. Find all employees in Dept “Marketing”. 5. Find all the employees who have taken more than 2 courses. 6. Find all the employees who have completed the courses before month of September.

2171


what are all the different normalizations? : Sql dba

505


What is the purpose of using pl/sql?

661


What is primary key secondary key alternate key candidate key?

541


How to combine two stored procedures in sql?

591


Why do we use sql constraints?

655


Are views faster than queries?

539


Can unique keys be null?

484


What is sql resultset?

527