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 |
What is on delete restrict?
What is use of trigger?
Can we delete column in sql?
What are the differences between implicit and explicit cursors?
How does a self join work?
what is index? : Sql dba
what are wild cards used in database for pattern matching ? : Sql dba
How long it takes to learn pl sql?
what is a database transaction? : Sql dba
hi sql gurus, here is my question 4 u. i wanna use triggers for sending reminder mail to all users who are registered to the site. if any one knws the code plz send me ans here : chayabs3@gmail.com thnx advance
What is foreign key in sql with example?
What is the process of copying data from table a to table b?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)