如题所述
假如你的原来的表tb有
id,name,address三列
其中id是自动增长列,删除其中若干行以后,你可以这样啊
创建存储过程
createproc
as
begin
declare@temptable
(
idintidentity(1,1),namevarchar(20),addressvarchar(20)
)
insert@temp
selectname,addressfromtb
select*from@temp
end
这样你就可以得到一个ID连续的新表了
温馨提示:答案为网友推荐,仅供参考