PL / SQL procedure calls

2

Studying PL / SQL I came across the following code:

CREATE PROCEDURE incluir_segmercado(p_id IN NUMBER , 
                                    p_descricao IN VARCHAR2)

IS
BEGIN 
    INSERT INTO segmercado
        values(p_id, UPPER(p_descricao));
    COMMIT;
END;

EXECUTE incluir_segmercado(3, 'Farmaceutico')

BEGIN 
    incluir_segmercado(4, 'Industrial');
END;

The author used 2 ways to call the procedure created above, but did not explain the difference between calling EXECUTE and calling BEGIN, is there any kind of difference between calls?

    
asked by anonymous 13.11.2018 / 02:27

1 answer

3

EXECUTE (or exec, in its most abbreviated form) executes only one procedure

BEGIN / END can execute more than one command at a time

Good studies!

    
13.11.2018 / 02:47