Oracle存储过程demo

CREATE [OR REPLACE] PROCEDURE PROC_DEMO(PARAM1 IN TYPE,PARAM2 OUT TYPE)
AS
   变量1 类型(值范围);
   变量2 类型(值范围);
BEGIN
    SELECT COUNT(*) INTO 变量1 FROM 表A WHERE列名=PARAM1;
    IF (判断条件) THEN
        SELECT 列名 INTO 变量2 FROM 表A WHERE列名=PARAM1;
        DBMS_OUTPUT.PUT_LINE(‘打印信息‘);
    ELSIF (判断条件) THEN
        DBMS_OUTPUT.PUT_LINE(‘打印信息‘);
    ELSE
        RAISE 异常名(NO_DATA_FOUND);
    END IF;
EXCEPTION
   WHEN OTHERS THEN
        ROLLBACK;
END;

Oracle存储过程demo

上一篇:CCS - Spread Spectrum Communication Systems - Direct-Sequence Spread Spectrum Systems - Code Division Multiple Access


下一篇:gdb 调试 segment default 问题