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?
- A. Row 1 only
- B. Row 2 only
- C. Both row 1 and row 2
- 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। बाद में तालिका में डाली गई पंक्तियों में से कौन-सी होंगी?
- A. केवल पंक्ति 1
- B. केवल पंक्ति 2
- C. पंक्ति 1 और पंक्ति 2 दोनों
- D. कोई नहीं
उत्तर: A. ROLLBACK TO s1 केवल सेवपॉइंट के बाद किया गया कार्य (पंक्ति 2) पूर्ववत करता है; पंक्ति 1 रहती है, और COMMIT उसे स्थायी बना देता है। सादा ROLLBACK दोनों को पूर्ववत कर देता।
More Computer Awareness questions
- A transfer debits Account A, but the system crashes before Account B is credited. On restart, the debit is undone, so it is as if the…
- Two transactions run at the same time on the same accounts, yet the final result is the same as if one had run fully before the other…
- A database stores records as a tree in which every child record has exactly one parent, as in a company → department → employee chart…
- In the three-schema (ANSI/SPARC) architecture, the part of the database that one user group sees, such as the loan officers' view, is…
- A table has 8 columns and 120 rows. What are its degree and its cardinality?
- Which relational algebra operation picks out chosen COLUMNS of a relation and removes any duplicate rows that result?