Assignment 4 - Operators in SQL - 3
Assignment 4 - Operators in SQL - 3
1) UPDATE Queries
1. Update the salary of all employees by adding 5000 to their current salary.
3. Set the Department to 'Marketing' for employees whose salary is less than 60,000.
6. Replace the Last_Name with 'Unknown' for employees whose Email is NULL.
8. Set the Department to 'HR' for employees with Emp_ID between 5 and 10.
10. Increase the salary by 15% for employees in 'Marketing' and 'Sales' departments.
11. Set the Department to 'Finance' for employees whose salary is between 50,000 and
70,000.
12. Update the Last_Name to 'NewName' for employees whose first name starts with
'A' and ends with 'a'.
13. Change the Hire_Date to the current date (SYSDATE) for employees whose salary is
greater than 90,000.
14. Update the Email domain to 'updated.com' for all employees (Replace
@credence.in with @updated.com).
15. Set the Salary to NULL for employees whose Department is NULL.
2) DELETE Queries
16. Delete employees who have a salary less than 50,000.
18. Delete employees in the 'HR' department whose salary exceeds 80,000.
23. Remove employees whose salary is not between 60,000 and 80,000.
26. Delete employees who are not in the 'Finance' or 'Sales' department.
28. Delete employees whose First_Name starts with a vowel ('A', 'E', 'I', 'O', 'U').