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 |
Write a query to find the employees from EMP table those who have joined in Monday. (there is a column as hiredate which is a date column i.e values are like 03-DEC-81)
What is a Procedure ?
What does stand for in sql?
How do you bind variables in pl sql?
Which is better trigger or stored procedure?
How do you write an inner join query?
Can we create index on primary key?
What is an Integrity Constraint?
How to Execute a Package in PL/SQL.?
How to call shell script from pl sql procedure?
Is it possible to remove child records without removing master table records...the two having pk,fk relationship?
What is a scalar value in sql?
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)