Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / sd

Cursors allow row-by-row prcessing of the resultsets.

Types of cursors: Static, Dynamic, Forward-only, Keyset-
driven

Is This Answer Correct ?    30 Yes 7 No

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

Answer / ashish sehra

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 ?    21 Yes 1 No

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

Answer / rajiv rohilla

In SQL Server 2000 Cursors are used in stored procedures /
Functions where we have to go each record of a recordset
one by one.

Is This Answer Correct ?    16 Yes 6 No

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

Answer / vasanthi

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;

5.DEALLOCATE cursor_name;


sample
******

DECLARE Employee_Cursor CURSOR FOR
SELECT LastName, FirstName
FROM AdventureWorks2008R2.HumanResources.vEmployee
WHERE LastName like 'B%';

OPEN Employee_Cursor;

FETCH NEXT FROM Employee_Cursor;
WHILE @@FETCH_STATUS = 0
BEGIN
FETCH NEXT FROM Employee_Cursor
END;

CLOSE Employee_Cursor;
DEALLOCATE Employee_Cursor;

Is This Answer Correct ?    4 Yes 2 No

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

Answer / arshad abbasi

Cursors allow row-by-row prcessing of the resultsets.

Types of cursors: Static, Dynamic, Forward-only, Keyset-
driven

Is This Answer Correct ?    1 Yes 1 No

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

Answer / lekhraj deshmukh

Cursor:-Cursor is used for fetching the ror by row data from
tables.
Note:-Cursor is the only datatypa that can not be used in
table creation.
When will be use cursor need to perform following steps:-
1)decalere a cursor
2) open a cursor
3)fetch the cursor
4)close the cursor
5)deallocate the cursor
Types of cursor:-
1)API cursor
2)client cursor
3)sql server cursor

Is This Answer Correct ?    9 Yes 10 No

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

Answer / 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

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

Answer / saswat gupta

Cursor is a datatype that is not used in table. and only
used in stored Procedure/function

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More SQL Server Interview Questions

How to download and install microsoft sql server management studio express?

0 Answers  


What is sql server profiler trace data file?

0 Answers  


How many columns can exist together per table?

0 Answers   Cap Gemini,


Can you change the data type of a column in a table after the table has been created? If so, which command would you use?

0 Answers  


Explain the basic concepts of SQL server architecture?

2 Answers   College School Exams Tests,


1. What are the grouping function in SQL ? 2. If base table of a view deleted means, what will happen while we querying on view ? will give any error ? 3. Difference between DROP, DELETE, TRUNCATE table ? 4. What is constraints and types ? 5. What is max size of nchar & nvarchar ? 6. Define ROLLBACK, COMMIT, SAVE POINT 7. How non-clustered better ? or rank the Clustered, Non-Clustered and Table scan in performance wise 8. Select 10 rows from a table ? 9. Define DML, DDL, DCL, DTL commands ? 10. What is mean by NULL value ? NULL means "" or 0 or undefined ? 11. Default constraints ? 12. Can we have more then primary Key in table ? 13. Type of integrity ? Entity, Referential, Domain ?

10 Answers   Perot Systems,


* CREATE TABLE [dbo].[t_Colors]([ColorId] [int] NOT NULL,[ColorName] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [ColorDesc] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,[ColorIndex] [int] NULL) ON [PRIMARY] GO * insert into [t_Colors] values(101,'Red','',1) insert into [t_Colors] values(101,'Red1','',2) insert into [t_Colors] values(102,'Blue','',1) insert into [t_Colors] values(102,'Blue1','',2) insert into [t_Colors] values(102,'Blue2','',3) * In this table i need to delete DELETE FROM t_Colors WHERE ColorIndex=1 AND ColorId=102 After delete above condition i need to update the ColorIndex set to 1 for Blue1[ColorName] and 2 for Blue2[ColorName] select * from [t_Colors] Note:- how can i get updates the ColorIndex values after delete. for example we need to update Blue1 ColorIndex set to 1 and Blue2 ColorIndex set to 2

0 Answers  


Difference between Inner vs outer joins?

0 Answers  


What does it mean to be in union?

0 Answers  


What are the different types of triggers in SQL SERVER?

0 Answers  


Delete duplicate rows without using rowid.

0 Answers   Nagarro,


how to invoke a trigger on demand? : Sql server database administration

0 Answers  


Categories