There is no for-loop, only the while-loop:
DECLARE @i int = 0
WHILE @i < 20
BEGIN
SET @i = @i + 1
/* do some work */
END
More Related Contents:
- How do I perform a GROUP BY on an aliased column in SQL Server?
- SQL dot notation
- Curly braces in T-SQL
- Calculate a Running Total in SQL Server
- Truncate (not round) decimal places in SQL Server
- Select statement to find duplicates on certain fields
- Getting only Month and Year from SQL DATE
- Update records in table from CTE
- Dynamic Pivot Columns in SQL Server
- WHERE Clause vs ON when using JOIN
- Is it possible to select sql server data using column ordinal position
- Selecting N rows in SQL Server
- @@IDENTITY, SCOPE_IDENTITY(), OUTPUT and other methods of retrieving last identity
- How can I INSERT data into two tables simultaneously in SQL Server?
- SQL “select where not in subquery” returns no results
- How can a LEFT OUTER JOIN return more records than exist in the left table?
- Dynamic SQL to generate column names?
- Column name or number of supplied values does not match table definition
- Split one column value into multiple column values
- How to find consecutive rows based on the value of a column?
- T-SQL – Aliasing using “=” versus “as” [closed]
- Which SQL query is faster? Filter on Join criteria or Where clause?
- SQL Query – Concatenating Results into One String [duplicate]
- Know relationships between all the tables of database in SQL Server
- Split words with a capital letter in sql
- SQL poor stored procedure execution plan performance – parameter sniffing
- Eliminate and reduce overlapping date ranges
- scope_identity vs ident_current
- COALESCE Function in TSQL
- When to use EXCEPT as opposed to NOT EXISTS in Transact SQL?