且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在一个表中插入从整个数据库中删除的数据?

更新时间:2023-02-03 21:23:39

在SQL中,您可以在数据库级别创建的触发器是关于DDL(数据定义语言)。

所以如果你不想处理来自不同表的删除必须为所有表添加触发器。

关于写入 - 您将遇到不同表中不同列的问题。一种解决方法是在目标表上使用XML ...
In SQL the triggers you can create on database level are about DDL (Data Definition Language).
So if you wan't to handle deletions from different tables you must add trigger to all of them.
About the writing - you will have the problem of different columns in different tables. One way to solve is using XML on the target table...