Топ-100
 
RDBMS Type: MySQL
Topic

Syntax:
CALL sp_name([parameter[,...]])
CALL sp_name[()]

The CALL statement invokes a stored procedure that was defined
previously with CREATE PROCEDURE.

Stored procedures that take no arguments can be invoked without
parentheses. That is, CALL p() and CALL p are equivalent.

CALL can pass back values to its caller using parameters that are
declared as OUT or INOUT parameters. When the procedure returns, a
client program can also obtain the number of rows affected for the
final statement executed within the routine: At the SQL level, call the
ROW_COUNT() function; from the C API, call the mysql_affected_rows()
(https://dev.mysql.com/doc/c-api/8.0/en/mysql-affected-rows.html)
function.

For information about the effect of unhandled conditions on procedure
parameters, see
https://dev.mysql.com/doc/refman/8.0/en/conditions-and-parameters.html.

URL: https://dev.mysql.com/doc/refman/8.0/en/call.html

Example