What arc "Global" and "Local" cursors? | SQL Server interview questions

Cursors are global for a connection. By default cursors are global. That means you can declare a cursor in one stored procedure and access it outside also. Local cursors are accessible only inside the object (which can be a stored procedure, trigger or a function). You can declare a cursor as "Local" or "Global" in the "DECLARE" cursor syntax. Refer the "DECLARE" statement of the cursor in the previous sections.

0 comments:

Post a Comment

Blogger news