CALL Statement

A stored procedure serves as an extension to clients and it is run on the database server. They can be invoked from a client application or another routine with a CALL statement. Stored procedures and their calling programs exchange data using parameters defined in the CREATE PROCEDURE statement. Stored procedures can also return result sets to their callers.

There are a variety of benefits of using a stored procedure:

  • Enable multiple SQL statements to be issued by a single invocation from the caller, thus minimizing data transfer between the client and the database server. The more SQL statements you include in a stored procedure, the lower the data transfer costs for each individual statement, as compared to issuing the same ...

Get DB2® Version 8: The Official Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.