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 / ramkiran
select emp.deptno,emp.ename,dept.deptno,dept.dname from
emp,dept
where emp.deptno(+) = dept.deptno
order by 1
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / 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 |
How is data stored on a disk?
what is a table in a database ? : Sql dba
What is the difference between the Primary and Foreign key?
i have a table like this. cityno cityname mails 1 BANGALORE 8KM 2 HSR LAYOUT 20KM 3 MEJISTIC 30KM 4 JAYADEVA 55KM 5 ITPL 80KM 6 HEBBAL 115KM I HAVE DATA LIKE THIS I WANT O/P LIKE THIS DISTANCE NO.OFCITY 0-50KM 3 51-100KM 2 101-150KM 4 AND SO ON pls give me answer. i want urgent
how many ways to get the current time? : Sql dba
Does truncate need commit?
discuss about myisam key cache. : Sql dba
What normalization means?
How to run sql*plus commands in sql developer?
Is sql database free?
What are synonyms in sql?
how to achieve this problem?i am having table with two colums like empno,gender. in gender column, i am having records male,female like that .my final output will be male female 5 6