Calls from Procedure PL/SQL

Asked

Viewed 93 times

1

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 make the call from the above created Procedure, however, did not explain the difference of calling by EXECUTE and calling by BEGIN, there is some kind of difference between calls?

1 answer

3


EXECUTE (or exec, in its shortest form) performs only one procedure

BEGIN/END can execute more than one command at the same time.

Good studies!

  • I appreciate the help!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.