Question

SQL Please explain how DML is related to COMMIT and ROLLBACK

SQL
Please explain how DML is related to COMMIT and ROLLBACK

0 0
Add a comment Improve this question Transcribed image text
Answer #1

DML which is also an acronym of Data manipulation language which includes SQL commands like Insert, Update, Delete. which are basically used for inserting, deleting or modifying data.

Commit command is used to permanently save any transaction in the database. whenever we use insert or delete commands the changes made by these commands are not permanent. until the current session is closed. The changes made by these commands can be rollback. To avoid this we use commit command to mark the changes permanently.

Commit command: COMMIT;

Rollback command restores the database to the last committed state. If any DML commands like update then it makes some changes to the database and in some cases, these changes are not required then we can use rollback to the changes if they are not committed with using the commit command. Rollback uses savepoint to jump to the savepoint in an ongoing transaction.

Rollback Command: ROLLBACK to savepoint_name;

Add a comment
Know the answer?
Add Answer to:
SQL Please explain how DML is related to COMMIT and ROLLBACK
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT