Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

PostgreSQL Exam PGCES-02 Topic 10 Question 69 Discussion

Actual exam question for PostgreSQL's PGCES-02 exam
Question #: 69
Topic #: 10
[All PGCES-02 Questions]

Table t1 is defined as follows: CREATE TABLE t1 (value VARCHAR(5)); A set of SQL statements were executed in the following order. Select the number of rows that table "t1" has after execution. BEGIN; INSERT INTO t1 VALUES ('A'); SAVEPOINT sp; INSERT INTO t1 VALUES ('B'); ROLLBACK TO sp; INSERT INTO t1 VALUES ('C'); COMMIT;

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Myra
3 months ago
I think the answer is E) 0 rows because of the ROLLBACK statement.
upvoted 0 times
...
Leonor
3 months ago
Wait, did they just throw in a COMMIT at the end to confuse us? I'm going with D) 4 rows, just to be on the safe side. Better safe than sorry, right?
upvoted 0 times
Wilford
2 months ago
I'm sticking with 4 rows just to play it safe.
upvoted 0 times
...
Fidelia
2 months ago
I'm sticking with 4 rows, just to be safe.
upvoted 0 times
...
Shizue
2 months ago
I agree, I'll go with 2 rows as well.
upvoted 0 times
...
Marshall
2 months ago
I'm not sure, maybe it's 0 rows because of the ROLLBACK.
upvoted 0 times
...
Lashawnda
2 months ago
But then the COMMIT should make it 3 rows, right?
upvoted 0 times
...
Oretha
2 months ago
I think it's 2 rows because of the ROLLBACK to the SAVEPOINT.
upvoted 0 times
...
Mitsue
2 months ago
I think it's actually 2 rows because of the ROLLBACK to the SAVEPOINT sp.
upvoted 0 times
...
...
Leonard
3 months ago
I'm not sure, but I think the answer might be D) 4 rows.
upvoted 0 times
...
Fanny
3 months ago
This is a tricky one, but I think I've got it. The ROLLBACK TO sp ensures that the 'B' row is never committed, so the final count is 2 rows. B) 2 rows is the way to go.
upvoted 0 times
Lorrine
2 months ago
Yes, the 'B' row is never committed, so the final count is 2 rows.
upvoted 0 times
...
Mollie
3 months ago
I agree, the ROLLBACK TO sp statement is key here.
upvoted 0 times
...
...
Fernanda
3 months ago
I disagree, I believe the answer is C) 3 rows.
upvoted 0 times
...
Erasmo
3 months ago
Ah, I see what's going on here. The ROLLBACK TO sp undoes the insertion of 'B', so the final result is 3 rows. C) 3 rows is the correct answer.
upvoted 0 times
Marquetta
3 months ago
Yes, you're right. The ROLLBACK TO sp undoes the insertion of 'B', so the final result is 3 rows.
upvoted 0 times
...
Jeanice
3 months ago
I think it's 3 rows.
upvoted 0 times
...
...
Xochitl
3 months ago
I think the answer is B) 2 rows.
upvoted 0 times
...
Micheline
4 months ago
Hmm, let's see... After the ROLLBACK TO sp, the table should only have the first row with 'A', so the answer is A) 1 row.
upvoted 0 times
Graciela
3 months ago
You're right, it's A) 1 row.
upvoted 0 times
...
Adaline
3 months ago
Actually, it should be A) 1 row.
upvoted 0 times
...
Fatima
3 months ago
No, I believe it's B) 2 rows.
upvoted 0 times
...
Mitsue
3 months ago
I think it's A) 1 row.
upvoted 0 times
...
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77