About 1,730,000 results
Open links in new tab
  1. What is Cursor in SQL - GeeksforGeeks

    Aug 4, 2025 · A cursor in SQL is a database object used to process data one row at a time, useful when row-by-row handling is needed instead of bulk processing. It temporarily stores data for operations …

  2. SQL Server Cursor Explained By Examples

    These are steps for using a cursor: First, declare a cursor. Code language: SQL (Structured Query Language) (sql) To declare a cursor, you specify its name after the DECLARE keyword with the …

  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. SQL Server Cursor Example

    Sep 28, 2025 · A SQL Server cursor is a set of T-SQL logic that loops over a predetermined number of rows one at a time. The purpose of the cursor may be to update one row at a time or perform an …

  5. 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.

  6. T-SQL Cursors - Create cursors in SQL Server

    To create a cursor, use the CURSOR DECLARE syntax. When you declare a cursor, it is loaded with records, in order to access the records of the cursor it must be opened using OPEN and the rows are …

  7. SQL Cursors Explained: Complete Guide with Best Practices

    Dec 19, 2024 · Master SQL cursors for row-by-row processing. Learn cursor types, implementation, performance considerations, and alternatives across SQL Server, PostgreSQL, MySQL, and Oracle. …

  8. How to Use Cursor in SQL for Row-by-Row Processing?

    Apr 23, 2025 · Summary: Cursors in SQL allow row-by-row data processing, essential for tasks requiring sequential logic. This guide covers cursor types in SQL Server, their lifecycle, practical examples, …

  9. SQL - Cursors - Online Tutorials Library

    In MySQL, you cannot declare a cursor directly outside of a stored procedure or function. Cursors are generally declared within stored procedures, functions, or blocks of SQL code in MySQL database. …

  10. SQL Cursor: Syntax, Usage, and Examples - mimo.org

    To use a SQL cursor, you typically go through five steps: declare the cursor, open it, fetch each row, process the row, and close the cursor when you're done. Here’s a common pattern for declaring and …