Computer AwarenessVery hardIBPS SO IT Officer

A transaction runs: INSERT row 1; SAVEPOINT s1; INSERT row 2; ROLLBACK TO s1; COMMIT. Which of the inserted rows are in the table afterwards?

  1. A. Row 1 only
  2. B. Row 2 only
  3. C. Both row 1 and row 2
  4. D. Neither row

Correct answer: A. Row 1 only

ROLLBACK TO s1 undoes only the work done after the savepoint (row 2); row 1 stays, and COMMIT makes it permanent. A plain ROLLBACK would have undone both.

हिंदी में

एक लेन-देन चलता है: पंक्ति 1 INSERT करें; SAVEPOINT s1; पंक्ति 2 INSERT करें; ROLLBACK TO s1; COMMIT। बाद में तालिका में डाली गई पंक्तियों में से कौन-सी होंगी?

  1. A. केवल पंक्ति 1
  2. B. केवल पंक्ति 2
  3. C. पंक्ति 1 और पंक्ति 2 दोनों
  4. D. कोई नहीं

उत्तर: A. ROLLBACK TO s1 केवल सेवपॉइंट के बाद किया गया कार्य (पंक्ति 2) पूर्ववत करता है; पंक्ति 1 रहती है, और COMMIT उसे स्थायी बना देता है। सादा ROLLBACK दोनों को पूर्ववत कर देता।

More Computer Awareness questions

Exams that ask this topic