CREATE CURSOR curtest (test1 I, test2 I) *-- Add rows here select test1, test2, recno() from (select test1, test2 from curtest)