语法:
CREATE PROCEDURE {schema.}name {({IN|OUT|INOUT}
param_name data_type {,...})}
{LANGUAGE <LANG>} {SQL SECURITY <MODE>}
{READS SQL DATA {WITH RESULT VIEW <view_name>}} AS
BEGIN
...
END
删除:
语法:DROP PROCEDURE {schema.}name {CASCADE}
修改:
ALTER PROCEDURE {schema.}name RECOMPILE {WITH PLAN}
sample:
CREATE PROCEDURE ProcWithResultView(IN id INT, OUT o1 CUSTOMER)
LANGUAGE SQLSCRIPT READS SQL DATA WITH RESULT VIEW ProcView AS
BEGIN
o1 = SELECT * FROM CUSTOMER WHERE CUST_ID = :id;
END;
How to call:
CALL getOutput (1000, 'EUR', NULL, NULL);