BEGIN
<<LOOP_EXTERNO>>
FOR V_EXTERNO IN 1..20 LOOP
DBMS_OUTPUT.PUT_LINE('Contador externo: ' || V_EXTERNO);
<<LOOP_INTERNO>>
FOR V_INTERNO IN 1..5 LOOP
DBMS_OUTPUT.PUT_LINE('Contador interno: ' || V_INTERNO);
IF V_EXTERNO = 10 THEN
EXIT LOOP_EXTERNO;
END IF;
END LOOP INTERNO;
END LOOP EXTERNO;
END;
/
This command is in PL/SQL
, and I do not understand how to do it in SQL server
, I do not know if it's the same thing or something changes.
Could anyone help me?