-- 1. 使用一个变量 declare -- Local variables here v_name ); begin -- Test statements here select t.user_name into v_name from pay_mer_order t ; dbms_output.put_line(v_name); end; -- 2. 使用多个变量 declare -- Local variables here v_name ); v_trans_no ); v_app_c…
原文参考:http://plsql-tutorial.com/ 创建语法: CREATE [OR REPLACE ] TRIGGER trigger_name {BEFORE | AFTER | INSTEAD OF } {INSERT [OR] | UPDATE [OR] | DELETE} [OF col_name] ON table_name [REFERENCING OLD AS o NEW AS n] [FOR EACH ROW] WHEN (condition) BEGIN ---…
原文参考:http://plsql-tutorial.com/ 组成: 1) 异常类型 2) 错误码 3) 错误信息 代码结构: DECLARE Declaration section BEGIN Exception section EXCEPTION WHEN ex_name1 THEN -Error handling statements WHEN ex_name2 THEN -Error handling statements WHEN Others THEN -Error handl…