Professional Documents
Culture Documents
Exercises For Practical 7: I) Select From Employee From Employee Where Job - Id 'ST - CLERK' AND Hire - Date '31-DEC-1997'
Exercises For Practical 7: I) Select From Employee From Employee Where Job - Id 'ST - CLERK' AND Hire - Date '31-DEC-1997'
Exercises For Practical 7: I) Select From Employee From Employee Where Job - Id 'ST - CLERK' AND Hire - Date '31-DEC-1997'
1) Create the employee table as below and copy the insert statement provided to insert the
records.
_pct nu
2) Once you complete the above steps, write the sql select statement for each of the questions
below:-
i) Show all data of the programmers who have been hired after the year 1997.
iii) Show the employees that have no commission with a 10% raise in their salary
(round off the salaries).
iv) Show the last names of all employees together with the number of years that they
have been employed.
Select l_name, TRUNC((SYSDATE-HIRE_DATE)/365.25) “YEARS”
FROM EMP;
**SYSDATE= current date
vi) Show all employees, and indicate with “ Yes” or “ No” whether they receive a
commission.
vii) Show all employees who were hired in the first half of the month (before the 16th
of the month).
viii) Show the names, salaries, and the number of dollars (in thousand s) that all
employees earn.