Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Assignment 3 : Retrieve Length, Between, Not Between, Like, And, Or

Using Select Command in Data Manipulation Language (DML)


Given Data:
Emp_no. Emp_name Job Hire_date Salary Commission Dept_no.
(varchar2) (varchar2) (varchar2) (date) (number) (number) (varchar2)
7369 Smith Clerk 17-Dec-80 800 0 20
7499 Allen Salesperson 20-Feb-81 1600 300 30
7521 Walker Salesperson 22-Feb-81 1250 500 30
7566 Jones Manager 02-Apr-80 2975 0 20
7654 Martin Salesperson 28-Sep-81 1250 1400 30
7698 Blake Manager 01-May-81 2850 0 30
7782 Clark Manager 09-Jun-81 2450 0 10
7788 Scott Analyst 19-Apr-87 3000 0 20
7844 Turner Salesperson 08-Sep-81 1500 0 30
7876 Adams Clerk 23-May-87 100 0 20
7900 James Clerk 03-Dec-81 950 0 30
7934 Miller Clerk 23-Jun-82 1300 0 10

1. List the Emp_name of all employees which starts with ‘S’.

2. List the Emp_name of all employees which start with ‘A’.

3. List the Emp_name of all employees which end with ‘n’.

4. List the Emp_name of all employees which start with a vowel.

5. List the Emp_name of all employees which end with a vowel.

6. List the Emp_name of all employees whose name(s) contain vowel(s) at any position.

7. List the Emp_name of all employees whose name(s) do(es) not contain vowel(s) at any
position.

8. List the Emp_name of all employees which start with a consonant.

9. List the Emp_name of all employees which end with a consonant.


10. List the Emp_name of all employees whose name’s fourth (4th) character is ‘t’.

11. List the Emp_name of all employees whose name’s second (2nd) character is ‘l’.

12. List the Emp_name of all employees whose name(s) contain ‘ar’ at any position.

13. List the Emp_name and Job of all employees who have names exactly of 5 characters in
length.

14. List the Emp_name and Job of all employees who have names exactly of 6 characters in
length and ends with ‘r’.

15. List all employees who have not joined between (Hire_date is not between) 01-Jan-81 and
31-Dec-81.

16. List all employees whose Job starts with ‘C’.

17. List all employees whose Job contains ‘e’ at the third (3rd) position.

18. List all managers who earned more 2500.

19. List all employees whose Emp_name starts with ‘J’ and Job starts with ‘M’.

20. List all employees whose Job starts with a vowel.

21. List all clerks and salesperson who earned more than 500.

22. List all employees who joined as manager during 1981.

You might also like