Assignment SQL Statements
Assignment SQL Statements
Write SQL statements to create the above two tables DEPARTMENT and EMPLOYEE using CREATE
table statement.
3. Find all the employees from employee table who are female.
4. Find all the manager number from the department table in descending order of manager number.
5. Find all the department names from department table in ascending order of department number.
employee table.
7. Find the employee number, last name, salary and an increment of 10% salary renaming the
heading as “Increment” from the employee table and sort them according to the increment in
descending order.
8. Find those employees from employee table who are clerk and earn salary more than 20000.
9. Insert a new record to the employee table which contains “BRIAN” as last name, 000350 as
10. Insert a new record to the employee table which contains “SHING” as last name, 000360 as
13. Delete all the records from employee table that are operator and earn salary less than 17000.
14. Increase the salary of all employees in employee table by 8% of existing salary.
Update employee
Set salary =salary*1.08;
15. Change the work department of employee number 000250 from D21 to F21 in employee table.
Update employee
Set workdept = ‘F21’
Where empno = ‘000250’;
16. Find the phone number of the employee name DANIEL in employee table.