4 个解决方案
#1
在第一个表上加触发器,在inserted中获取插入的name值,写入第二张表。
http://www.cnblogs.com/hoojo/archive/2011/07/20/2111316.html
http://www.cnblogs.com/hoojo/archive/2011/07/20/2111316.html
#2
有通俗易懂的解答么
#3
触发器:
----------------------------------------------神奇的分割线、两端虚线居然一样长----------------------------------------------
create trigger tri_updatetime on comics
for insert
as
declare @name varchar(50) ;
select @name=name from inserted;
update video set time = getdate() where name=@name;
----------------------------------------------神奇的分割线、两端虚线居然一样长----------------------------------------------
#4
感谢!
#1
在第一个表上加触发器,在inserted中获取插入的name值,写入第二张表。
http://www.cnblogs.com/hoojo/archive/2011/07/20/2111316.html
http://www.cnblogs.com/hoojo/archive/2011/07/20/2111316.html
#2
有通俗易懂的解答么
#3
触发器:
----------------------------------------------神奇的分割线、两端虚线居然一样长----------------------------------------------
create trigger tri_updatetime on comics
for insert
as
declare @name varchar(50) ;
select @name=name from inserted;
update video set time = getdate() where name=@name;
----------------------------------------------神奇的分割线、两端虚线居然一样长----------------------------------------------
#4
感谢!