You define a table procedure using the CREATE TABLE PROCEDURE statement. In the following example, the table procedure ORGANIZATION is named and associated with schema EMP. The name of the program to be called to service a DML request against the procedure, EMPORG, is specified in the EXTERNAL NAME parameter. The parameters to be passed to and from the procedure are listed. Each parameter definition consists of a name and a data type.
CREATE TABLE PROCEDURE EMP.ORGANIZATION
(TOP_KEY UNSIGNED NUMERIC(4),
LEVEL SMALLINT,
MGR_ID UNSIGNED NUMERIC(4),
MGR_LNAME CHAR(25),
EMP_ID UNSIGNED NUMERIC(4),
EMP_LNAME CHAR(25),
START_DATE CHAR(10),
STRUCTURE_CODE CHAR(2))
EXTERNAL NAME EMPORG;
|
Copyright © 2014 CA.
All rights reserved.
|
|