Concept Flow - Cursor declaration and usage
Declare Cursor
Open Cursor
Fetch Row
Process Row
More Rows?
Yes→Fetch Row
No
Close Cursor
The cursor is declared, then opened to access query results row by row. Each row is fetched and processed until no more rows remain, then the cursor is closed.