---
title: "What is cursors?"  
description: "What is cursors?"  
author: "Amit Singh"  
published: 2011-05-03  
updated: 2020-09-21  
canonical: https://www.mindstick.com/interview/815/what-is-cursors  
category: "mssql server"  
tags: ["mssql server"]  
reading_time: 1 minute  

---

# What is cursors?

Cursor is a database object used by applications to manipulate data in a set on a row-by-row basis, instead of the typical SQL commands that operate on all the rows in the set at one time.

In order to work with a cursor we need to perform some steps in the following order:

Declare cursor\
Open cursor\
Fetch row from the cursor\
Process fetched row\
Close cursor\
Deallocate cursor

## Answers

### Answer by Amit Singh

Cursor is a database object used by applications to manipulate data in a set on a row-by-row basis, instead of the typical SQL commands that operate on all the rows in the set at one time.

In order to work with a cursor we need to perform some steps in the following order:

Declare cursor\
Open cursor\
Fetch row from the cursor\
Process fetched row\
Close cursor\
Deallocate cursor


---

Original Source: https://www.mindstick.com/interview/815/what-is-cursors

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
