Professional Documents
Culture Documents
select ename "Employee Names", dname "Department Names", sal "Employee Salary", nvl(comm,0)
"Commission", grade "Employee Grades"
where emp.deptno=dept.deptno
select ename "Employee Names", job "Employee Job", mgr "Supervised Manager", loc "Department
Location", dept.deptno "Department Number", decode (job,
'CLERK', sal+sal*.20,
'SALESMAN', sal+sal*.30,
'MANAGER', sal+sal*.60,
'ANALYST', sal+sal*.40,
where emp.deptno=dept.deptno
3- Display salary in terms of „$‟ where each $ represents Rs.100.
select lpad(sal,(sal/100),'$')
from emp e
4- Using outer join show employee name , department name and department id.
from emp e
on (e.deptno=d.deptno)
5- Show Cartesian product of table employee and department.
select *
select substr(ename,4,1)
from emp e
where deptno>10
Task 2
Create table t1 and insert these rows in t1.