Home Forums SQL Server 7,2000 T-SQL Please give me a replacement for a Cursor RE: Please give me a replacement for a Cursor

  • You assumption is correct

    I added a simple "select @minid" to the code above and constructed a similar cursor example. Then I ran the two algorithms on a table with 77000 rows. They both completed in 48 secs (you need an index on id, of course).

    Are you looking for something even faster, or is there a different reason for not using cursors?