Today found a small thing, feel very interesting, find some information, share with you:
In the Sqlplus:
Tools provided by third parties (e.g., Plsqldev)
Summarize:
exec is a sqlplus command and can only be used in Sqlplus.
Call is a SQL command, any tool can be used, call must have parentheses, i.e. no parameters
Call must have parentheses, i.e. no parameters idle>Connect/ asSYSDBA is connected. SYS@PO10>SYS@PO10> Create procedureP_test is 2 begin 3 NULL; 4 End; 5 /The process has been created. SYS@PO10>SYS@PO10> execp_test PL/The SQL process has completed successfully. SYS@PO10>Call p_test2 ; Call P_test*Section1line error: ORA-06576: Not a valid function or procedure name SYS@PO10>Call p_test (); The call is complete. SYS@PO10> execCan only be used in sqlplus; call may be used anywhere
Hope to be useful to those who need ...
The difference between call and exec in Oracle