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?
Answers were Sorted based on User's Feedback
Answer / ramya pisharody
Ans-1:
SELECT DEPTNO, COUNT(*) FROM EMP
GROUP BY DEPTNO
HAVING COUNT(*)>10;
Is This Answer Correct ? | 3 Yes | 0 No |
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 |
ANS-3:
SELECT employee_id , department_id
FROM employees
WHERE department_id IS NULL;
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / ajit
ANS - 2
select d.deptno, dname, loc
from emp e, dept d
where e.deptno(+) = d.deptno
and e.deptno is null;
Is This Answer Correct ? | 0 Yes | 0 No |
how to create object in plsql
Explain the difference between cursor declared in procedures and cursors declared in the package specification?
what is d diff between grant,commit,rollback n savepoint
What is %type in pl sql?
please explain database architecture..
how to delete an existing column in a table? : Sql dba
How can we make an if statement within a select statement?
What is pl sql and why it is used for?
what is subquery? : Sql dba
How can we link a sql database to an existing android app?
how to extract a unit value from a date and time? : Sql dba
What is an index? What are the types of indexes? How many clustered indexes can be created on a table?