CREATE trigger 触发器名
on 表名
for update,delete
as
set nocount on
create table #t(EvebtType varchar(60),Parameters int,EventInfo varchar(2000))
declare @id varchar(20)
set @id=@@spid
insert #t
exec('DBCC INPUTBUFFER ('+@id+')') if exists (select 1 from #t where EventInfo not like '%where%')
BEGIN
RAISERROR ('删除、修改语句必须写where部分',16, 1)
ROLLBACK TRANSACTION
END

最新文章

  1. Word2vec多线程(tensorflow)
  2. 使用PowerShell解三道测试开发笔试题
  3. 利用opencv训练样本分类
  4. EF6 CodeFirst+Repository+Ninject+MVC4+EasyUI实践(九)
  5. (c语言编程)出现错误:null undeclared identifier
  6. [LeetCode]题解(python):047-Permutations II
  7. C#连接数据库的四种方法(转)
  8. UIcollectionView的使用(首页的搭建2)
  9. 开源负载测试工具k6比JMeter更容易的5件事
  10. Python函数分类及操作
  11. bsxfun, arrayfun, cellfun, spfun, structfun
  12. SharePoint 2013 Workflow Manager 1.0 远程服务器返回错误: (400) 错误的请求。 不支持查询字符串中的 api-version
  13. jqgrid 设置冻结列
  14. 如何看一段JAVA代码耗了多少内存
  15. 【Linux】cat充当vi使用(特殊用法)
  16. ios中要在tableview中添加事件的方法
  17. LeetCode 11 Container With Most Water(分支​判断问题)
  18. yii2中关联查询
  19. zoj 2314 Reactor Cooling (无源汇上下界可行流)
  20. dwr的A request has been denied as a potential CSRF attack.错误

热门文章

  1. Go语言核心36讲(Go语言实战与应用二十七)--学习笔记
  2. java 输入输出IO流:FileOutputStream FileInputStream
  3. 再识requests
  4. 网络编程socket 结合IO多路复用select; epool机制分别实现单线程并发TCP服务器
  5. mysql 在删除数据出现Cannot delete or update a parent row: a foreign key constraint fails 这个该如何解决
  6. 【LeetCode】169. Majority Element 解题报告(Java & Python & C+)
  7. 【九度OJ】题目1153:括号匹配问题 解题报告
  8. 【LeetCode】999. Available Captures for Rook 解题报告(C++)
  9. 【LeetCode】49. Group Anagrams 解题报告(Python & Java & C++)
  10. 【LeetCode】388. Longest Absolute File Path 解题报告(Python)