Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Question of the Day for 27 Sep 2006 Expand / Collapse
Author
Message
Posted Tuesday, September 12, 2006 12:05 PM
SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, May 18, 2007 3:36 PM
Points: 10,039, Visits: 1
Comments posted to this topic are about the Question of the Day for 27 Sep 2006 posted at http://www.sqlservercentral.com/testcenter/qod.asp?QuestionID=880.
Post #307996
Posted Wednesday, September 27, 2006 8:00 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, February 6, 2014 9:39 AM
Points: 420, Visits: 487

You need to pay attention to the difference between cursors and variables.  Answer B was "Release the resources from a cursor", so it is correct.  The answer would not have been correct if you had used variable instead of cursor.

Even the article you referenced says, "DEALLOCATE removes the association between a cursor and the cursor name or cursor variable. If a name or variable is the last one referencing the cursor, the cursor is deallocated and any resources used by the cursor are freed."

 



Joshua Perry
http://www.usesage.com
Post #311532
Posted Wednesday, September 27, 2006 9:21 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, April 30, 2013 9:07 PM
Points: 1,529, Visits: 824
The following link:
http://msdn2.microsoft.com/en-us/library/ms190028.aspx
also says "The DEALLOCATE statement completely frees all resources allocated to the cursor, including the cursor name."

This is the second reference that supports answer B as being the correct answer.



Post #311576
Posted Friday, December 22, 2006 8:21 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, May 15, 2007 10:51 AM
Points: 255, Visits: 1

B should be the correct answer.

Post #332522
Posted Thursday, November 22, 2012 11:39 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 5:43 AM
Points: 1,945, Visits: 2,386
easy one..


_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #1388050
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse