About 258,000 results
Open links in new tab
  1. SQL Server Cursor Example

    Sep 28, 2025 · A SQL Server cursor loops over a set number of rows one at a time to update data or perform DBA processes such as backups as an example.

  2. SQL Server Cursor Explained By Examples

    In this tutorial, you will learn how to use the SQL Server cursor to process a result set, one row at a time.

  3. DECLARE CURSOR (Transact-SQL) - SQL Server | Microsoft Learn

    Nov 18, 2025 · Defines the attributes of a Transact-SQL server cursor, such as its scrolling behavior and the query used to build the result set on which the cursor operates.

  4. What is Cursor in SQL - GeeksforGeeks

    Aug 4, 2025 · Here is a complete example of declaring, opening, fetching, closing, and deallocating a cursor. This workflow demonstrates how to use explicit cursors for row-by-row operations, including …

  5. T-SQL Cursors - Create cursors in SQL Server - T-SQL Tutorial

    In the example below, we will create a cursor by going through all the steps that make up the cursor. In the declarative part we will DECLARE and load the cursor with records and we will also declare …

  6. Cursor Example - Brent Ozar Unlimited®

    In this 16-minute video, Doug Lane explains how to use a date table, which will help you work around cursors that loop through date lists:

  7. Loop through table rows with Cursor in SQL Server - ASPSnippets

    Feb 2, 2025 · In this article I will explain with an example, how to loop through table rows with Cursor in SQL Server. Cursor is supported in following SQL Server versions i.e. 2008, 2008R2, 2012, 2014, …

  8. Mastering SQL Server Cursors: A Comprehensive Guide with Examples ...

    The SQL Server Cursor is a powerful tool for handling data row-by-row, making it especially useful for tasks requiring iterative processing. In this tutorial, we’ll delve into a detailed SQL Server Cursor …

  9. What is the use of a cursor in SQL Server? - Stack Overflow

    Sep 25, 2018 · To use cursors in SQL procedures, you need to do the following: 1.Declare a cursor that defines a result set. 2.Open the cursor to establish the result set. 3.Fetch the data into local variables …

  10. What is Cursor in SQL - Explained with Examples - Intellipaat

    Aug 21, 2025 · Learn Cursor in SQL with its types, syntax, usage examples, key benefits, and best practices for efficiently processing data row by row.