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.
![Task 2:
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
that if an error occurs the updates will rollback to their previous state. Create a script
for them to first add all tasks and then rollback the changes.
Task
Add a tire change maintenance task for every car and rollback the changes.
<>](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb8c0c34f-4efe-414c-bc97-7840ece07cee%2F973e33f1-7093-4de0-b5c6-0f46a506a005%2Fitibyti_processed.png&w=3840&q=75)
![Expected Results
CAR_ID
MAINTENANCE_TYPE_ID
MAINTENANCE_DUE
1001
1
2020-09-01
1001
2020-12-31
1002
2020-09-01
1003
1
2020-09-01
1004
1
2020-09-01
1001
2
2020-06-01
1003
2
2020-06-01](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb8c0c34f-4efe-414c-bc97-7840ece07cee%2F973e33f1-7093-4de0-b5c6-0f46a506a005%2F997so4a_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
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
![Oracle 12c: SQL](https://www.bartleby.com/isbn_cover_images/9781305251038/9781305251038_smallCoverImage.gif)
![A Guide to SQL](https://www.bartleby.com/isbn_cover_images/9781111527273/9781111527273_smallCoverImage.gif)
![Oracle 12c: SQL](https://www.bartleby.com/isbn_cover_images/9781305251038/9781305251038_smallCoverImage.gif)
![A Guide to SQL](https://www.bartleby.com/isbn_cover_images/9781111527273/9781111527273_smallCoverImage.gif)
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)