Skip to content
Advertisement

Syntax of for-loop in SQL Server

What is the syntax of a for loop in TSQL?

Advertisement

Answer

T-SQL doesn’t have a FOR loop, it has a WHILE loop
WHILE (Transact-SQL)

WHILE Boolean_expression
BEGIN

END
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement