0% found this document useful (0 votes)
11 views4 pages

Assignment 4 - Operators in SQL - 3

The document outlines assignment submission guidelines for students at Credence IT Professional Training Institute, Pune, including a format for naming files. It provides a detailed Employees Table with personal and employment information for various employees, followed by a list of SQL update and delete queries to manage employee data. Contact information and the institute's website are also included for further inquiries.

Uploaded by

omprakashmunde33
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views4 pages

Assignment 4 - Operators in SQL - 3

The document outlines assignment submission guidelines for students at Credence IT Professional Training Institute, Pune, including a format for naming files. It provides a detailed Employees Table with personal and employment information for various employees, followed by a list of SQL update and delete queries to manage employee data. Contact information and the institute's website are also included for further inquiries.

Uploaded by

omprakashmunde33
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

CREDENCE IT PROFESSIONAL

TRAINING INSTITUTE, PUNE

Share your Assignment File with name, format = Name_Batch_assignmentname

e.g. PoojaPatil_CT#21_ Assignment2_Operators in SQL

Refer below Employees Table:

EMP_ FIRST_NA LAST_NA HIRE_D SALA DEPARTM PHONE_NU


ID ME ME EMAIL ATE RY ENT MBER
aarav.sharma@crede 1-1- 5000 9876-5459-
1 Aarav Sharma nce.in 2023 0 IT 87654
vihaan.patel@creden 2-1- 5200
2 Vihaan Patel ce.in 2023 0 Finance 9876543211
ananya.mehta@crede 3-1- 5400
3 Ananya Mehta nce.in 2023 0 HR 9876543212
ishaan.gupta@creden 4-1- 5500
4 Ishaan Gupta ce.in 2023 0 IT 9876543213
diya.chopra@credenc 5-1- 5700
5 Diya Chopra e.in 2023 0 Marketing 9876543214
arjun.reddy@credenc 6-1- 6000
6 Arjun Reddy e.in 2023 0 Sales 9876543215
kavya.iyer@credence. 7-1- 6200
7 Kavya Iyer in 2023 0 Finance 9876543216
rohan.kulkarni@crede 8-1- 6400
8 Rohan Kulkarni nce.in 2023 0 HR 9876543217
[email protected] 9-1- 6500
9 Aditi Das n 2023 0 IT 9876543218
vivaan.bhat@credenc 10-1- 6700
10 Vivaan Bhat e.in 2023 0 Finance 9876543219
sanya.jain@credence. 11-1- 7000
11 Sanya Jain in 2023 0 Marketing 9876543220
[email protected] 12-1- 7500
12 Dev Singh n 2023 0 HR 9876543221
aryan.malhotra@cred 1-15- 7600
13 Aryan Malhotra ence.in 2023 0 Sales 9876543222
[email protected] 2-15- 7700
14 Nisha Rao n 2023 0 IT 9876543223
karan.nair@credence. 3-15- 7800
15 Karan Nair in 2023 0 Finance 9876543224

Email: [email protected] Website: https://www.credence.in

Contacts: +91 8237916162, +91 7391053250, +91 9579064658, +91 9091929355


CREDENCE IT PROFESSIONAL
TRAINING INSTITUTE, PUNE

meera.singh@creden 4-15- 7900


16 Meera Singh ce.in 2023 0 HR 9876543225
[email protected] 5-15- 8000
17 Raj Verma n 2023 0 Sales 9876543226
[email protected] 6-15- 8200
18 Ira Kumar n 2023 0 IT 9876543227
kabir.shukla@creden 7-15- 8400
19 Kabir Shukla ce.in 2023 0 Finance 9876543228
leela.sinha@credenc 8-15- 8600
20 Leela Sinha e.in 2023 0 HR 9876543229
ravi.tripathi@credenc 9-15- 8700
21 Ravi Tripathi e.in 2023 0 Marketing 9876543230
anika.yadav@credenc 9-15- 9600
22 Anika Yadav e.in 2023 0 IT 9876543231
rohit.basu@credence. 9-15- 9000
23 Rohit Basu in 2023 0 Finance 9876543232
9-15- 9100
24 Sneha Sen 2023 0 Sales 9876543233
9-15- 9600
25 Abhay Roy 2023 0 HR 9876543234
neha.kapoor@creden 9-15- 9300
26 Neha Kapoor ce.in 2023 0 Finance 9876543235
3-20- 9400
27 Aman Dutta 2023 0 Marketing 9876543236
tanya.ghosh@creden 4-20- 9500
28 Tanya Ghosh ce.in 2023 0 9876543237
5-20- 9600
29 Riya Agarwal 2023 0 IT 9876543238
Chatterj nitin.chatterjee@cred 9700
30 Nitin ee ence.in 0 HR 9876543239

Email: [email protected] Website: https://www.credence.in

Contacts: +91 8237916162, +91 7391053250, +91 9579064658, +91 9091929355


CREDENCE IT PROFESSIONAL
TRAINING INSTITUTE, PUNE

1) UPDATE Queries
1. Update the salary of all employees by adding 5000 to their current salary.

2. Increase the salary of employees in the 'IT' department by 10%.

3. Set the Department to 'Marketing' for employees whose salary is less than 60,000.

4. Change the Hire_Date of employees in the 'Sales' department to '2024-01-01'.

5. Update the Phone_Number of employees who do not have a phone number


(Phone_Number IS NULL) to '9999999999'.

6. Replace the Last_Name with 'Unknown' for employees whose Email is NULL.

7. Update the Salary to 75,000 for employees in the 'Finance' department.

8. Set the Department to 'HR' for employees with Emp_ID between 5 and 10.

9. Update the First_Name by appending '_Updated' for employees whose Last_Name


starts with 'K'.

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).

Email: [email protected] Website: https://www.credence.in

Contacts: +91 8237916162, +91 7391053250, +91 9579064658, +91 9091929355


CREDENCE IT PROFESSIONAL
TRAINING INSTITUTE, PUNE

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.

17. Remove employees whose Hire_Date is before '2023-01-01'.

18. Delete employees in the 'HR' department whose salary exceeds 80,000.

19. Remove employees whose Phone_Number contains the substring '123'.

20. Delete employees whose Last_Name ends with 'n'.

21. Remove employees who have no Email (Email IS NULL).

22. Delete employees in the 'IT' and 'Marketing' departments.

23. Remove employees whose salary is not between 60,000 and 80,000.

24. Delete employees whose First_Name starts with 'K' or 'R'.

25. Remove employees whose Hire_Date is NULL.

26. Delete employees who are not in the 'Finance' or 'Sales' department.

27. Remove employees whose salary is exactly 70,000.

28. Delete employees whose First_Name starts with a vowel ('A', 'E', 'I', 'O', 'U').

29. Remove employees whose Last_Name contains the substring 'ar'.

30. Delete employees whose First_Name is exactly 7 characters long.

Email: [email protected] Website: https://www.credence.in

Contacts: +91 8237916162, +91 7391053250, +91 9579064658, +91 9091929355

You might also like