Reputation: 19572
In my mind I always thought of a cursor in databases as a pointer used to access a result set. But I heard that there are isolation levels for cursors.
So perhaps a cursor is not just a pointer?
What exactly is then an SQL cursor that seems to have stability levels?
Upvotes: 4
Views: 1346
Reputation: 172458
SQL Cursor is a database object used by applications to manipulate data in a set on a row-by-row basis
You may check this MYSQL Transaction
On a side note:-
Cursors have performance issues so try to avoid them as much as possible!
Upvotes: 1
Reputation: 15259
Cursor is a pointer in database engine space(object or number). So it is identificator which can be used to got your query(already done, but not fetched) from sql engine.
For example for simple query like select * from somebigtable
cursor will be point to list structure of rows headers, and rows will be fetched from disks only when you ask it.
Upvotes: 0