在创建触发器时出现不能在 'inserted' 表和 'deleted' 表中使用 text、ntext 或 image 列...

纵饮孤独 提交于 2019-11-26 11:50:24
1、
不能在 'inserted' 表和 'deleted' 表中使用 text、ntext 或 image 列


create trigger trg on t1 for update

改成

 

 

create trigger trg on t1 instead of update

将for改成 instead of 就可以在触发器中访问二进制字段了,也不需要去根据id去查询

 

 

2、

不能比较或排序 text、ntext 和 image 数据类型,除非使用 IS NULL 或 LIKE 运算符

当你想对inserted及deleted两个表进行对比时可能会出现以上错误

 

转载于:https://www.cnblogs.com/samlin/archive/2012/06/30/2571000.html

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!