What are cursors? Name four types of cursors and when each
one would be applied?
Answer Posted / basha
Following are different types of cursors available in SQL Server 2005 :
Base table
Static
Dynamic
Forward-only/Read-only
Keyset-driven
Base table: Base table cursors are the lowest level of cursor available. Base table cursors can scroll forward or backward with minimal cost, and can be updated
Static: Cursor can move to any record but the changes on the data can’t be seen.
Dynamic: Most resource extensive. Cursor can move anywhere and all the changes on the data can be viewed.
Forward-only: Cursor moves one step forward, can’t move backwards.
Keyset-driven: Only updated data can be viewed, deleted and inserted data cannot be viewed.
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
Define union, union all, minus, intersect?
You have a stored procedure, which execute a lengthy batch job. This stored procedure is called from a trigger you do not want to slow the data entry process you do not want trigger to wait for this batch job to finish before it completes itself what you can do to speed up the process?
Why main is user defined function?
How to get a list of columns in a view using the "sp_help" stored procedure?
What is use of except clause?
How do I make a resultset scrollable?
How to round a numeric value to a specific precision?
How to verify a user name with sqlcmd tool?
Can a table have 2 foreign keys?
How can you ensure that the database and sql server based application perform well?
Do you know what is replace and stuff function in sql server?
What is the difference between DataRow.Delete() and DataRow.Remove()?
Tell me what is normalization? Explain different forms of normalization?
explain different types of cursors? : Sql server database administration
what are different types of backups available in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration