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


    语法:

    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);

  • 相关阅读:
    Java面試題(实用性高)
    索引的概述?
    给Eclipse提速的7个技巧
    ETL数据仓库
    实用SQL语句大全
    考证
    PL/SQL 程序
    eclipse
    httpd.conf详解,因为php始终报fileinfo扩展无法加载的错
    dockerfile创建镜像及容器
  • 原文地址:https://www.cnblogs.com/omygod/p/3013480.html
Copyright © 2020-2023  润新知