January 2020
Beginner
256 pages
5h 11m
English
In this lesson, you’ll be introduced to cursors and how (and why) to use them.
SQL retrieval operations work with sets of rows known as result sets. The rows returned are all the rows that match a SQL statement—zero or more of them. When you use simple SELECT statements, there is no way to get the first row, the next row, or the previous 10 rows. This is an integral part of how a relational DBMS works.
New Term: Result Set
The results retrieved by a SQL query.
Sometimes you need to step through rows forward or backward and one or more at a time. This is what cursors are used for. A cursor is a database query stored on the DBMS server—not a SELECT statement, but the result set retrieved by that ...
Read now
Unlock full access