What is the difference between deallocate cursor and close cursor?



What is the difference between deallocate cursor and close cursor?..

Answer / Amresh Kumar Singh

In SQL Server, a DEALLOCATE CURSOR explicitly releases resources associated with a cursor, while a CLOSE CURSOR only closes the cursor without releasing any associated resources. It's essential to use DEALLOCATE to free up memory once you no longer need the cursor.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

Explain transaction server explicit transaction?

1 Answers  


List all the types of user-defined functions?

1 Answers  


What is an execution plan?

1 Answers  


Can you force a query to use a specific index?

1 Answers  


Explain for xml explicit mode?

1 Answers  


Is it possible to create trigger on views?

1 Answers  


What is factless fact table? : sql server analysis services, ssas

1 Answers  


What is difference between aggregate and analytic function?

1 Answers  


Tell me about builtinadministrator?

1 Answers  


is it important for a database administrator to understand the operating system and file access? : Sql server administration

1 Answers  


What is data source document?

1 Answers  


What is an example of a foreign key?

1 Answers  


Categories