The Car Maintenance team wants to add Tire Change (ID: 1) maintenance task for all cars with the due date of 1 September, 2020. However, the team also wants to know chat if an error occurs the updates will rollback to their previous state. Create a script or them to first add all tasks and then rollback the changes.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 1 images
This doesn't have the rollback or insert it into the maintenances table
You are assigned as the
Car Maintenance team wants to add new maintenance tasks to the MAINTENANCES table which was created in Chapter 8, Activity 1. However, the team also wants to insert the tasks in a batch into the database. In other words, they want to insert the rows all together without inserting one-by-one. Therefore, you will need to create a script to add the following tasks and ensure that they are added together:
- Car ID: 1001, Maintenance Type: 2, Due: 2020-06-01
- Car ID: 1003, Maintenance Type: 2, Due: 2020-06-01