2
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 the PL/SQL
, and I don’t understand how to do it in SQL server
, I don’t know if it’s the same thing or something changes.
Could someone help me?