sybase触发器实例
create trigger trigger_allon table_afor insert,update,deleteasif not exists(select * from deleted) and exists(select * from inserted)---插入begininsert into table_middle (id,kind,time) select id1,'I',getDate() from insertedendelse if exists(select * from deleted) and not exists(select * from inserted)---删除begininsert into table_middle (id,kind,time) select id1,'D',getDate() from deletedendelse if exists(select * from deleted) and exists(select * from inserted)---更新begininsert into table_middle (id,kind,time) select id1,'U',getDate() from insertedend