Skip to main content

What is a transaction?

Mid MySQL
Quick Answer A transaction is a group of SQL operations that execute as a single unit. Either all succeed (COMMIT) or all fail and roll back (ROLLBACK). Start: START TRANSACTION (or BEGIN). End: COMMIT or ROLLBACK. InnoDB supports transactions. MyISAM does not. Use transactions for operations that must be atomic: transferring money (debit + credit must both succeed or both fail).

Answer

A transaction is a group of SQL operations treated as a single unit that can be committed or rolled back.
S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice