我想建立一个触发器在删除表A中的资料时,把删除的资料放入到表B中
但是在建立时提示错误:
不能在 'inserted' 表和 'deleted' 表中使用 text、ntext 或 image 列。表A中image类型的字段。
想吧表A中的字段都保留下来,有什么方法可以解决。
如果不能用触发器,还有其它的方法使用吗?
但是在建立时提示错误:
不能在 'inserted' 表和 'deleted' 表中使用 text、ntext 或 image 列。表A中image类型的字段。
想吧表A中的字段都保留下来,有什么方法可以解决。
如果不能用触发器,还有其它的方法使用吗?
as
begin
insert into 表B(A,B,C,D) select A,B,C,D from deleted
delete from t where A in(select A from deleted)
end表A要设置主键A
as
begin
insert into 表B(A,B,C,D) select A,B,C,D from deleted
delete from 表A where A in(select A from deleted)
end
表A要设置主键A
as
begin
insert into 表B(A,B,C,D) select A,B,C,D from deleted
delete from 表A where A in(select A from deleted)
end
可以使用,在网上查发现好像不是很好。