Challenge: Simulate a Transaction Rollback
Oppgave
Swipe to start coding
In this task, you will simulate a failed transaction in SQL and ensure that no changes are saved to the database. This exercise builds on your understanding of transaction logic and data integrity.
- Begin a transaction.
- Update the
balanceforaccount_id = 1001by subtracting 100.00. - Simulate an error that would cause the transaction to fail.
- Roll back the transaction so that the balance remains unchanged.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 4. Kapittel 6
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Fantastisk!
Completion rate forbedret til 4.55
Challenge: Simulate a Transaction Rollback
Sveip for å vise menyen
Oppgave
Swipe to start coding
In this task, you will simulate a failed transaction in SQL and ensure that no changes are saved to the database. This exercise builds on your understanding of transaction logic and data integrity.
- Begin a transaction.
- Update the
balanceforaccount_id = 1001by subtracting 100.00. - Simulate an error that would cause the transaction to fail.
- Roll back the transaction so that the balance remains unchanged.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 4. Kapittel 6
single