answersLogoWhite

0

Purpose of a cursor in T-SQL?

Updated: 9/16/2023
User Avatar

Wiki User

13y ago

Best Answer

The purpose of a cursor in a database is to provide an option to the programmer using which he/she can iterate through the contents of a table one record at a time and use it for processing. A sample cursor can be created using the below statement

DECLARE cursor_employee CURSOR FOR SELECT * FROM tbl_employee_info

The above cursor cursor_employee will contain the contents of the table tbl_employee_info and can be used by the programmer for manipulation one record at a time.

A Cursor may act like a DataStructure . it stores the record coming from the base table . in if we want ot retrive the date very fastly we will user cursors.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Purpose of a cursor in T-SQL?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the purpose of the cell cursor in an excel sheet?

to select cells


Where are some of the places that one could find tutorials for TSQL?

There are many places one might go to find a tutorial for 'TSQL.' In addition the W3School website, which provides website information, one might also check the local library.


What is the name of the SQL language used in SQL Server stored procedures?

Transact SQL (TSQL)


How do you put SQL Server in hot backup mode?

Use the TSQL backup command to backup an active database.


What is the purpose of a serial mouse?

Like all other mice, the purpose of a serial mouse is to move a cursor or pointer across a computer display.


What is the function of the cursor?

the function of cursor control keys it helps to move the cursor.


What is the cursor on ms Excel is called the?

The cursor is called a cursor in MS Excel.


What is the function of the cursor key?

the function of cursor control keys it helps to move the cursor.


When you type in your password you see a blinking vertical bar What is this called and what is its purpose?

It is called a cursor and tells you that the keyboard entry will start at this point on the screen.


What part of speech is cursor?

"Cursor" is a noun.


Why is the computer cursor called the cursor?

Its ugly


How do you change a mouse cursor?

In control pannel, select the cursor option..... and then, select ur cursor type.