日期:2014-05-18 浏览次数:20569 次
insert into b select title from a insert into c select b.id,a.content from a join b on a.title = b.title --a中的title没有重复值!
------解决方案--------------------
insert into b(title) select title from a
insert into c(content) select content from a
------解决方案--------------------
DECLARE @ID INT
SELECT @ID=MAX(ID) FROM B
INSERT B SELECT TITEL FROM A
INSERT C SELECT * FROM B WHERE ID>@ID