PrepZone Logo
PrepZone
Back to Database

Database · Medium

What is a database cursor? When should you avoid row-by-row processing?

DatabaseFundamentalsFresher

Answer preview

A cursor is a database object that holds the result set of a query and lets you fetch and process it one row at a time. It converts SQL's set-based model into a procedural loop, which is why it is usually far slower than the equivalent single statement.…