Begin, Rollback and Commit - Transactions in SQL #shorts #coding #sql #sqlqueries #sqlserver

preview_player
Показать описание
Begin, Rollback and Commit - Transactions in SQL #shorts #coding #sql #sqlqueries #sqlserver #programming #youtubeshorts
Рекомендации по теме
Комментарии
Автор

Hey if we rollback after commit it won’t work? If no then in what cases we use rollback?

ankush_in_sync
Автор

Not understood please explain littke bit slowly

roshaniagrahari
Автор

You are wrong, run rollback after commit. Commit and Rollback works together. This is not the correct way to use rollback.

Commit works for a permanent change that's correct but the eg. you are giving means inserting and then rollback ends the transaction as ROLLBACK is TCL so, rollback reverses the transaction itself. Try using Commit and then rollback it won't rollback. This is what the use of commit and rollback meaning rollback happens when commit fails due to exception

userzzzabc
visit shbcf.ru