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
Why I am getting this error when dropping a database in ms sql server?
What is a Join and explain its types?
What is the importance of concurrency control?
Other than truncate statement, which other command can by-pass the trigger on the tables?
What is join query?
is there a column to which a default can't be bound? : Sql server database administration
Distinguish between nested subquery and correlated subquery?
What is the difference between a stored procedure and a user defined function?
What are different replication agents and what's their purpose? : sql server replication
What are drillthrough reports?
How many types of stored procedures are there in sql server?
What is log shipping? Can we do logshipping with SQL Server 7.0 - Logshipping is a new feature of SQL Server 2000. We should have two SQL Server - Enterprise Editions. From Enterprise Manager we can configure the logshipping. In logshipping the transactional log file from one server is automatically updated into the backup database on the other server. If one server fails, the other server will have the same db and we can use this as the DR (disaster recovery) plan.
What is the difference between clustered and non-clustered indexes in ms sql server?
Why we use functions in sql server?
Explain forward - only cursors?