Professional Documents
Culture Documents
Assignment 4:
Table Structure:
HIREDATE DATE,
SAL NUMBER(7,2),
COMM NUMBER(7,2),
DEPTNO NUMBER(2) NOT NULL,
CONSTRAINT EMP_FOREIGN_KEY FOREIGN KEY
(DEPTNO) REFERENCES DEPT (DEPTNO),
CONSTRAINT EMP_PRIMARY_KEY PRIMARY KEY
(EMPNO));
EMPLOYEE
SMITH (clerk)
ALLEN (Salesman)
13. Display the unique department with jobs.
14. Display the details of the Blake.
15. List all the clerks.
16. List the empno, salary, commission of employees.
17. Display the unique department of the employees.
18. List all the employees joined on 1st may 81.
19. List the employees who are working as managers.
Classification: Internal
27. Display the names and salaries of all employees except JAMES.
SQL Operators
28. Display all the details of the employees whose Comm. Is more than their Salary.
29. List the employees Who Annual salary ranging from 22000 and 45000.
30. List the employee’s name, job that is without manager.
31. List the employee names starting with ‘M’.
32. List the employees end with ‘H’.
33. List the employees who joined in the year 81.
34. List the employees whose salary is ending with 00.
35. List the employee who joined in 80’s.
36. List the employee who are clerks who have experience more than 8ys.
37. List the Managers of dept 10 or 20.
38. Find out the details of employees whose names begin with ‘S’.
39. Find out the names of all employees that have ‘A’ anywhere in their name.
40. Find out the names of all employees that have ‘L’ as their third character in their
name.
41. Find out the names of the employees whose name begin with ‘A’ or ‘M’.
Classification: Internal
42. Select the name, job, salary, department number of all employees except
SALESMAN from department number 30.