DECLARE
BEGIN
EXCEPTION
END;
2,PLSQL块分类
1),匿名块
2)命名块
<<
DECLARE
BEGIN
<<
BEGIN
END;--<<
END;--<<
3)子程序
a,过程
CREATE PROCEDURE procedure_name(name1 VARCHEAR2, name2 NUMBER)
IS
BEGIN
END;
调用过程时用命令:execute或者call
b,函数
CREATE FUNCTION function_name(name1 NUMBER,name2 VARCHAR2)
RETURN NUMBER IS
return_name NUMBER(7,2)
BEGIN
END;
c,包
CREATE PACKAGE page_name IS
PROCEDURE procedure_name;
FUNCTION function_name;
END
4,触发器
CREATE TIGGER tigger_name
AFTER UPDATE OF deptno ON dept
FOR EACH ROW
BEGIN
END;
没有评论:
发表评论