Sybase ASA 8.0 trigger how to determine whether to insert ,update,delete operate.

Posted by guaike on Stack Overflow See other posts from Stack Overflow or by guaike
Published on 2010-03-27T07:06:17Z Indexed on 2010/03/27 7:13 UTC
Read the original article Hit count: 225

Filed under:
|
|

Follow is my trigger of Sybase ASA 8.0 script:

Create trigger dba.test after insert,delete,update order 1 on
DBA.tb_press
referencing old as _old new as _new
for each row
begin
  --How to detect deleteOperate,updateOperate?

  if deleteOperate then

      insert into syncLog(tableName,keyId,version,operate)
        select tb_press,_old.id,1,'delete' 
  end if;

end

how to determine whether to insert ,update,delete operate.

© Stack Overflow or respective owner

Related posts about sybase

Related posts about asa