BlackFriday 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 11 Question 75 Discussion

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

The table "t1" is defined below. The column "id"

for table "t1" is of INTEGER type.

id | name ----

+-----------1 |

mammoth 2 |

tortoise 3 |

coelacanth

The following SQL statements were executed. Select the correct statement about the execution result. BEGIN; DECLARE c SCROLL CURSOR FOR SELECT name FROM t1 ORDER BY id;

MOVE FORWARD 2 FROM c; FETCH FORWARD ALL FROM c; COMMIT;

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Julio
1 months ago
Oh man, cursors always trip me up. But I'm pretty sure the answer is C. Can't wait to be done with this exam and get back to my pet rock collection.
upvoted 0 times
Leigha
9 days ago
Definitely C, let's hope we're right.
upvoted 0 times
...
Annalee
21 days ago
I'm not sure, but C seems like the correct answer.
upvoted 0 times
...
Ernie
22 days ago
Yeah, I agree. C sounds right.
upvoted 0 times
...
Glenn
27 days ago
I think the answer is C.
upvoted 0 times
...
...
Virgina
2 months ago
I'm not sure, but I think the answer is C.
upvoted 0 times
...
Rasheeda
2 months ago
I agree with Pamella, the FETCH statement should return 1 row.
upvoted 0 times
...
Wilda
2 months ago
Hmm, I'm not so sure. The question mentions a SCROLL CURSOR, so I'm wondering if the cursor position can be reset somehow. Maybe the answer is D?
upvoted 0 times
...
Pamella
2 months ago
I think the correct answer is B.
upvoted 0 times
...
Kirk
2 months ago
I think the answer is C. The MOVE FORWARD 2 statement positions the cursor on the third row, and then the FETCH FORWARD ALL statement should return the remaining two rows.
upvoted 0 times
Kaycee
26 days ago
I believe it's A. The FETCH statement will return 0 rows because of an error in the execution.
upvoted 0 times
...
Latrice
30 days ago
I think it's B. The FETCH statement will return only 1 row after moving the cursor forward 2 positions.
upvoted 0 times
...
Cristen
1 months ago
I agree, the answer is C. The FETCH statement will return 2 rows after moving the cursor forward 2 positions.
upvoted 0 times
...
...

Save Cancel