猫咪家
首页
分类
标签
归档
关于
管理员
2020-11-12
1161
SQLSERVER触发器触发INSERT,UPDATE,DELETE三种状态
触发器内三种INSERT,UPDATE,DELETE状态 CREATE TRIGGER tr_Table ON Table for INSERT,UPDATE,DELETE 如IF exists (select * from inserted) and not exists (select * from deleted) 则为 INSERT 如IF exists(select * from inserted ) and exists (select * from deleted) 则为 UPDATE 如IF exists (select * from deleted) and not exists (select * from inserted)则为 DELETE 插入操作(Insert):Inserted表有数据,Deleted表无数据 删除操作(Delete):Inserted表无数据,Deleted表有数据 更新操作(Update):Inserted表有数据(新数据),Deleted表有数据(旧数据)
###Hello world!
Sqlserver
评论
发布
留言
评论