Multiple choice technology programming languages

What is a database cursor?

  1. A blinking vertical line that indicates the location of the next input on the display screen.

  2. A cursor is SQL keyword specifying a retrieved data order.

  3. Cursor is acronym for Current Set Of Records and is a database object pointing to a currently selected set of records.

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

A database cursor is a database object that allows traversal over the rows in a result set row-by-row. It represents the 'Current Set Of Records' and is commonly used in stored procedures and application code. Option A describes a UI cursor (blinking line), not a database cursor.

AI explanation

A database cursor is a control structure that lets you traverse and process the rows of a query's result set one at a time, tracking the current position ('current row') within that set — used heavily in stored procedures/PL-SQL/COBOL-DB2 code for row-by-row processing. The mnemonic 'Current Set Of Records' in the answer is a memory aid used in some training material rather than a formally standardized acronym, but it captures the right concept. The blinking-line answer confuses it with a text-editor cursor, and 'a SQL keyword specifying retrieval order' misdescribes what ORDER BY does, not what a cursor is.