高级别我有两个表需要镜像一些数据。我无法通过并更改所有代码以写入两者,所以我想我会使用SQL触发器将数据插入第二张表中,只要数据插入第一张表中。这里就是我坚持:插入SQL Server触发器以及如何引用插入的数据
CREATE TRIGGER new_trigger_INSERT
ON old_table
FOR INSERT
INSERT INTO new_table (id, first_name, last_name)
VALUES() --This is where I'm lost, I need to insert some of the data from the insert that executed this trigger
任何帮助表示赞赏,同时,如果有更好的方式来做到这一点让我知道。
谢谢,我没有意识到这些表存在。通过确保触发器处理多行,你的意思是什么? – jon3laze 2010-12-09 23:41:32