Académique Documents
Professionnel Documents
Culture Documents
1. Create a table DEPT792 having attributes dno, dname, dhead, location (loc) with constraints: Primary key on dno using table constraint, Default on dhead, Check on loc, NotNull on dname.
RDBMS
2. Create table EMP792N with attributes empno, ename, deptno, job, hire_date, salary, commission, loc. Table constraints are: Primary key on empno, foreign key on deptno with DEPT table using table constraints, check on job, unique on ename, check on salary<5000.
RDBMS
RDBMS
RDBMS
RDBMS
RDBMS
9. Add the following constraints to EMP792N table: Primary key on empno & Foreign key on deptno with department792
RDBMS
RDBMS
RDBMS
RDBMS
10
RDBMS
11
16. Show the ename, job, salary, and mgr from EMP792N table.
RDBMS
12
17. Show the ename, job and annual_salary from EMP792N table.
18. Show employees job in the following formatSmith works as clerk & give column aliases.
RDBMS
13
19. Show the email, job, mgr with manager Raj and Rajeev.
20. Show the email, job, mgr with manager Raj and Rajeev using IN clause.
RDBMS
14
21. Show ename, job, mgr who works in Deptno and salary>1000.
22. Show ename, job, mgr with salary between 1000 and 3000.
RDBMS
15
23. Show ename and job with job containing m from EMP792N table.
RDBMS
16
25. Show ename, deptno and salary of employees. Then order the result by deptno and salary in descending order.
RDBMS
17
26. Display the employees working for less than 10 years and columns to be displayed are empno, hire_date, no of months employed with no decimal places, first Friday after the hire_date, last day of the month when he is employed.
27. Find the min, max and average salary of each department.
RDBMS
18
28. Change the deptno of employees with salary less than 3000.
RDBMS
19
30. Find ename, salary, deptno of employees having same deptno as smith.
31. Find ename, salary, deptno of employees having same job as smith and salary greater than 2000.
RDBMS
20
QUERIES ON JOINS
1. Find ename, salary, job and dname of employees using equijoin.
2. Find ename, salary, job, and dname of employees using natural join.
RDBMS
21
3. Find ename, salary, job and dname of employees using left outer join.
4. Find ename, job, salary and dname of employees using right outer join.
RDBMS
22
6. Find ename, salary, job and dname of employees having salary>2000 using joins.
RDBMS
23