Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
181 views1 page

MySQL Update Table

The document provides 9 examples of SQL statements to update data in an employees table. It includes statements to update email and commission columns for all or some employees based on department ID or other criteria. Additional statements increase salaries for some employees or departments by a certain percentage and update job IDs or salaries if other conditions are met.

Uploaded by

Thuê Khấn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
181 views1 page

MySQL Update Table

The document provides 9 examples of SQL statements to update data in an employees table. It includes statements to update email and commission columns for all or some employees based on department ID or other criteria. Additional statements increase salaries for some employees or departments by a certain percentage and update job IDs or salaries if other conditions are met.

Uploaded by

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

1.

 Write a SQL statement to change the email column of


employees table with 'not available' for all employees.

2. Write a SQL statement to change the email and


commission_pct column of employees table with 'not available'
and 0.10 for all employees.

3. Write a SQL statement to change the email and


commission_pct column of employees table with 'not available'
and 0.10 for those employees whose department_id is 110.

4. Write a SQL statement to change the email column of


employees table with 'not available' for those employees whose
department_id is 80 and gets a commission is less than .20%

5. Write a SQL statement to change the email column of


employees table with 'not available' for those employees who
belongs to the 'Accouning' department.

6. Write a SQL statement to change salary of employee to 8000


whose ID is 105, if the existing salary is less than 5000.

7. Write a SQL statement to change job ID of employee which ID


is 118, to SH_CLERK if the employee belongs to department,
which ID is 30 and the existing job ID does not start with SH.

8. Write a SQL statement to increase the salary of employees


under the department 40, 90 and 110 according to the company
rules that, salary will be increased by 25% for the department 40,
15% for department 90 and 10% for the department 110 and the
rest of the departments will remain same.

9. Write a SQL statement to increase the minimum and maximum


salary of PU_CLERK by 2000 as well as the salary for those
employees by 20% and commission percent by .10.

You might also like