SQL CURSOR

Example of a cursor that queries all rows by index for each database