菜鸟求救,各位高手帮帮忙!!! 写一个触发器,实现以下的功能:SQL数据库中有两个表,两个表有主外键关系。当我在一个表中插入一行数据,同时更新另一个表中某列的数据。如何实现,跪等答复!,谢谢谢谢!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 create Trigger table1_InsertOn table1 For InsertAs Insert Into table1() (id) Select id From inserted Go create Trigger table1_Insert On ta1 For Insert As update a set a.col = i.col from inserted i ,ta2 a where i.id = a.idGo 求一个数据表横向变纵向的SQL语句 求一条sql语句 查询分析器建立一张表后,紧接着在对象浏览器打开此表,为什么表是只读的? 百万数据库循环取值进行更新的算法 关于SQL数据表关联查询的难题 SQL Server 2008中账户登录问题 一个sql查询问题,感觉很难 请教sp_addlinkedsrvlogin的用法 在企业管理器中无法查看表中的数据,提示执行该操作时发生意外错误 急问 SQL语句:感觉很简单的问题,可是我不会~请帮忙 很难写的SQL语句
On table1 For Insert
As
Insert Into table1()
(id)
Select id
From inserted
Go
On ta1 For Insert
As
update a
set a.col = i.col
from inserted i ,ta2 a
where i.id = a.id
Go