sql server 中insert问题 BEGIN TRANINSERT INTO 表1 ....INSERT INTO 表2 (id,...) VALUE ((SELECT MAX(ID) FROM 表1),...)COMMIT TRAN 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 to xl():能否给出具体的SP,多谢! 使用游标,在循环中使用:1. insert into table1 ..........2. insert into table2(id) select id from table1 where id=(select max(id) from table1) create trigger on t1 for insertasbegin insert into t2(id) select id from insertedend 就用触发器进行保证,很EASE的 N条 insert into 不使用事务 怎么弄? 怎样对char类型数据求平均 求一SQL语句 求tsql: 查询出总分分数段 这样的进销存报表如何写? 请问这句update句什么意思?再现求助,必给分! 主键问题 关于sql server数据库将表转换到网页上的问题! 在sqlserver的同一个数据库中如何复制一个表的表结构从而创建另一个不同名的新表? 怎样实现在sql server中执行一个脚本,能够从远程oracle数据库复制表 如何实现在vb中读取表名?? 请ldy(罗大佑)领分
能否给出具体的SP,多谢!
select id from table1 where id=(select max(id) from table1)
as
begin
insert into t2(id) select id from inserted
end