1. Home
  2. Data Science
  3. SQL for Data Analysis
  4. What does ROLLBACK TO SAVEPOINT sp1 do to the work…

Added 30 Nov -0001

What does ROLLBACK TO SAVEPOINT sp1 do to the work performed after that savepoint?

  1. It undoes that work but leaves the transaction open for more statements Correct answer
  2. It undoes the entire transaction, exactly as a full rollback would do to it
  3. It commits the work done before sp1 and discards everything after it
  4. It releases the savepoint but leaves all later changes still pending

Correct answer

A. It undoes that work but leaves the transaction open for more statements

21 views

MCQSEXAM

Explanation

A savepoint marks a position inside a transaction, and ROLLBACK TO restores that position while leaving the transaction active, discarding only the changes made after the mark. The savepoint itself survives and can be rolled back to again. RELEASE SAVEPOINT forgets the mark without undoing anything, which is quite different from committing the transaction.

Reference

Asked in: NTS, PPSC IT, Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More SQL for Data Analysis MCQs

Practise all SQL for Data Analysis MCQs

Similar MCQs