pseudorecords.sql
来自「Oracle 9i PL/SQL程序设计的随书源码」· SQL 代码 · 共 25 行
SQL
25 行
REM pseudoRecords.sql
REM Chapter 11, Oracle9i PL/SQL Programming by Scott Urman
REM This trigger shows that :old and :new are pseudo-records.
set echo on
CREATE OR REPLACE TRIGGER TempDelete
BEFORE DELETE ON temp_table
FOR EACH ROW
DECLARE
v_TempRec temp_table%ROWTYPE;
BEGIN
/* This is not a legal assignment, since :old is not truly
a record. */
v_TempRec := :old;
/* We can accomplish the same thing, however, by assigning
the fields individually. */
v_TempRec.char_col := :old.char_col;
v_TempRec.num_col := :old.num_col;
END TempDelete;
/
show errors
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?