SQL Server Cursor Reference (Syntax, etc)
Asked Answered
T

3

4

I don't use SQL Server Cursors often but when I do, I always have to look up the syntax and options.

So I wanted to ask, what is the best SQL Server Cursor reference on the web?.

I'm looking for a reference that explains all of the (major?) options (I.E. FAST_FORWARD) and also shows quick snippets of how to use it. (I.E. How to implement looping though a cursor and with a good practice for checking the @@FETCH_STATUS variable.)

Best Regards,
Frank

Quick Update: I'm looking for a balance of quick-reference but detailed enough to see my options. As an example. MSDN is a great reference guide but it has too much detail. The reference, ideally, should be concise.

Further update: I'm still looking for sources. If someone posts a good source that fits my criteria of concise, I will accept that answer...

Thisbee answered 1/6, 2009 at 15:34 Comment(2)
As an aside question/consideration, are you certain a cursor is the best design choice for your problem?Pershing
I'm not trying to 'solve' anything with this question. This is just something that came to mind as a good possible reference to have on Stack Overflow. I've not seen a question like it...Thisbee
C
1

I'd start out with the MSDN help page for cursors...

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

Clair answered 1/6, 2009 at 15:39 Comment(1)
Gets too technical; but it is a solid detailed reference guide.Thisbee
C
2

How to Perform SQL Server Row-by-Row Operations Without Cursors:
http://www.sql-server-performance.com/articles/per/operations_no_cursors_p1.aspx

SQL Server Cursor Examples (with Cursor Alternatives):
http://www.mssqltips.com/tip.asp?tip=1599

Chlorosis answered 1/6, 2009 at 15:41 Comment(0)
C
1

I'd start out with the MSDN help page for cursors...

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

Clair answered 1/6, 2009 at 15:39 Comment(1)
Gets too technical; but it is a solid detailed reference guide.Thisbee
S
1

I always use the built in "Transact-SQL Reference" help within management studio. I find the examples on everything there to be more than enough for what I need.

Shack answered 1/6, 2009 at 15:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.