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

What are relationships and mention different types of relationships in the dbms

559


What is the name of reporting services config file and what’s it’s used for?

107


Why it is recommended to avoid referencing a floating point column in the where clause?

540


What are the rules to use the rowguidcol property to define a globally unique identifier column?

593


What is data block and how to define data block size?

605






Explain how many normalization forms?

581


Explain the Ways to improve the performance of a sql azure database?

64


explain different types of joins? : Sql server database administration

534


what information is maintained within the msdb database? : Sql server administration

511


How to remove duplicate rows from table?

603


How to loop through result set objects using odbc_fetch_row()?

469


what is nonclustered index

547


What are pages and extents? : SQL Server Architecture

562


What are the types of dml?

558


What is 2nf example?

552