SAP HANA中的存储过程(sql procedure)

语法:

CREATE PROCEDURE {schema.}name {({IN|OUT|INOUT}
                                 param_name data_type {,...})}
      {LANGUAGE } {SQL SECURITY }
      {READS SQL DATA {WITH RESULT VIEW }} 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);

转载于:https://www.cnblogs.com/omygod/archive/2013/04/11/3013480.html

你可能感兴趣的:(SAP HANA中的存储过程(sql procedure))