I want to know how to fetch record from cursor in SQL server.
Thank you.
Fetch Record from Cursor in SQL Server
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Adil Ansari149 reputationPosted Aug 30, 2012, 4:57 AM EDT
DECLARE vend_cursor CURSOR FOR SELECT * FROM Purchasing.Vendor OPEN vend_cursor FETCH NEXT FROM vend_cursor;Vikrant MoreRank #1,157 · 1.6K reputationPosted Sep 11, 2012, 12:58 AM EDT
1] Declare Cursor
2] Open Cursor
3] Fetch Cursor
4] Deallocate Cursor
5] Close Cursor
#1 To declare cursor use following syntax,
DECLARE
FOR