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
What does it mean if @@cursor_row returns a negative number?
What is the difference between push and pull subscription? : sql server replication
How to apply filtering criteria at group level with the having clause in ms sql server?
What is the primary use of the model database?
What do you mean by stored techniques? How would we use it?
How to use linked server?
How to Insert multiple rows with a single insert statement?
Explain active/passive and active/active cluster configurations?
whats new about truncate in sql server 2008?
How to create a Master database in SQL server ?
What are logical database components? : SQL Server Architecture
Can you tell me some of the common replication dmv's and their use? : sql server replication
How to provide login information for a new odbc dsn?
What is the difference between varchar and nvarchar?
Can foreign key be duplicate?