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

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/p/2571000.html