What is a cursor in SQL Server 2000 and their types?

Answer Posted / kokila

When will be use cursor need to perform following steps:-

1. DECLARE CURSOR

2. OPEN

3. FETCH

4. @@FETCH_STATUS

5. CLOSE

6. DEALLOCATE


1.DECLARE cursor_name CURSOR FOR SELECT_statement;

2.OPEN cursor_name;

3.FETCH cursor_name INTO variable list;

5.CLOSE cursor_name;

6.DEALLOCATE cursor_name;

Cursor is the current position of recordset.There are 4
types of cursors.
1.forward Only (Default)
2.Static
3.Keyset
4.Dynamic

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define right outer join in sql server joins?

515


what are different types of backups available in sql server? : Sql server database administration

496


When would you use the stored procedures or functions?

574


Can you explain about buffer cash and log cache in sql server?

498


What is compression - row-level and page-level compression?

528






How to stop a loop early with break statements in ms sql server?

567


what is a check constraint?

636


What is index fragmentation in ms sql server?

597


What is impersonation? What are the different impersonation options available in ssas? : sql server analysis services, ssas

550


whats new about truncate in sql server 2008?

2024


How column data types are determined in a view?

534


What are sp_configure commands and set commands?

562


Explain how would you store your query in an SSRS report or a Database server?

88


What are the basic functions for master, msdb, model, tempdb and resource databases? : SQL Server Architecture

559


What is the optimal disk configuration for a database server and what raid configurations would you use if budget is not a constraint?

479