About 2,950,000 results
Open links in new tab
  1. Syntax of for-loop in SQL Server - Stack Overflow

    May 20, 2011 · SQL is a very different language compared to what you're used to. It's focused on what, not how. You tell SQL Server what results you want, and let it figure out how to produce the answer. …

  2. SQL FOR Loop Alternatives

    Dec 13, 2021 · Learn different ways to create FOR Loops using T-SQL such as using WHILE loops, cursors, tally tables and more.

  3. SQL Server: FOR LOOP - TechOnTheNet

    Learn how to simulate the FOR LOOP in SQL Server (Transact-SQL) with syntax and examples. In SQL Server, there is no FOR LOOP. However, you simulate the FOR LOOP using the WHILE LOOP.

  4. FOR LOOP Statement - Oracle Help Center

    With each iteration of the FOR LOOP statement, its statements run, its index is either incremented or decremented, and control returns to the top of the loop. The FOR LOOP statement ends when its index …

  5. FOR Clause (Transact-SQL) - SQL Server | Microsoft Learn

    Nov 18, 2025 · The SELECT statement that you use to access the data from your SQL Server table must end with the keywords FOR BROWSE. When you turn on the FOR BROWSE option to use browse mode, …

    Missing:
    • LOOP
    Must include:
  6. Ultimate guide to SQL loops.

    Jan 23, 2025 · Here is a complete guide to using loops in SQL that you can refer to for mastering them and using them proficiently

  7. SQL Loops. Mastering SQL Loops: A Practical Guide… | by Onur Cem …

    Sep 11, 2023 · In this article, we’ll explore the use of FOR loops in SQL, accompanied by practical examples that demonstrate their power and versatility. SQL loops, specifically FOR loops, provide a …

  8. FOREACH Statement - SQL Notebook

    Iterates over each row in a table or table expression, assigning the column values to the specified variables and executing the provided statements for each row. The loop may be terminated early by …

  9. How Can You Use a Loop to Iterate Through Each Value in a List in SQL?

    In SQL, looping structures like the WHILE loop can be used to iterate over a list of values, especially when procedural logic is required, such as in T-SQL or PL/SQL.

  10. SQL 'FOR LOOP' Statement: A Comprehensive Tutorial - Reintech

    Sep 24, 2023 · When working with SQL, the 'FOR LOOP' statement is a powerful tool for repetition control. It allows developers to execute a sequence of commands for a definite number of times. The …