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
Are ddl triggers fired for ddl statements within a pl/sql code executed using the dbms.sql package?
Which tcp/ip port does sql server run on? How can it be changed? : Sql dba
What is the maximum rows in csv?
Does normalization improve performance?
what is sql server agent? : Sql dba
Can we use rowid as primary key?
How can you load multi line records? : aql loader
What is a constraint?
How many types of triggers are there in pl sql?
Which is better varchar or nvarchar?
Write a query to display the current date in sql?
How do you rank data in sql?
Is sql a dbms?
What are hotfixes and patches?
What is pivot query?