tags:

views:

152

answers:

0

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.