declare @id intset @id=select id from A insert into A select isnull(max(@id),0),* from B就这样的思路吧!如果对我的回答有不满意的地方,还请继续追问;互相理解,互相帮助.