martes, 27 de octubre de 2020

FOR LOOP SQL Server

Ciclo while sql server 


Sintaxis

DECLARE @count INT = 0;

WHILE @count < cnt_total
BEGIN [sentencia] SET @count = @count + 1;
END;
Ejemplo:
DECLARE @count  INT = 0;

WHILE @count  < 1000
BEGIN
   select @count
   SET @count  = @count  + 1;
END;


No hay comentarios:

Publicar un comentario

Comenta cualquier duda o recomendatorio.