Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DECLARE @indice INT;
- SET @indice=0 ;
- WHILE (@indice<=10)
- BEGIN
- PRINT CAST(@indice AS VARCHAR(10))
- IF @indice=7
- BEGIN
- SET @indice=@indice+1;
- WAITFOR DELAY '00:00:05'
- CONTINUE;
- END
- ---- Dos formas de salir forzando el while
- IF @indice=4 GOTO mensaje;
- IF @indice=6 BREAK;
- ----------------------------------------
- SET @indice=@indice+1;
- END
- PRINT 'SALI DEL WHILE POR EL BREAK'
- mensaje:
- PRINT 'SALI DEL WHILE POR EL GOTO'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement