views:

45

answers:

1

I would like to know how cursor actually works in sql server 2008. For example, are the results held in memory as soon as the cursor is opened? or the results stored in an intermediate format, the real data is retrieved when fetch?

Please also suggest some good books or blogs about sql server internals.

Thanks.

+2  A: 

It depends on the type of cursor that you use. Check out this article on MSDN:

http://msdn.microsoft.com/en-us/library/ms188644.aspx

Rob Boek