When a database answers a query, it normally gives you a whole set of rows at once — a table. But many programs need to go through the rows one by one, looking at each line, making decisions, or updating another system. This chapter shows how cursors let you move through a result row by row, and how you can put SQL commands directly into a regular programming language like C, Java, or COBOL.