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 / krish
1)select deptno,count(*)
from emp having count(*)=0 group by deptno;
2)select deptno,count(*)
from emp having count(*)>10 group by deptno;
3)select empname from emp where deptno is null;
4)select emp.deptno,emp.ename,dept.deptno,dept.dname
from emp,dept
where emp.deptno=dept.deptno(+);
| Is This Answer Correct ? | 2 Yes | 6 No |
Post New Answer View All Answers
What is the difference between cluster and non-cluster index?
What is a call statement? Explain with an example.
Can we use update in sql function?
Is t sql a programming language?
What is the limitation on the block size of pl/sql?
how can we find the number of rows in a table using mysql? : Sql dba
can a stored procedure call itself or recursive stored procedure? : Sql dba
How does pl sql work?
How to add, remove, modify users using sql?
how does a local variable is defined using t-sql? : Transact sql
How can we connect an Android App to an Oracle database and use the PL/SQL procedural code?
How do you rename a table in sql?
how to rename an existing column in a table? : Sql dba
What are the two parts of design view?
What is memory optimized?