-- 1.新建同结构的表,首字段为自增型. create table [新表] ([首字段] int identity(1,1), ... ) -- 2.从旧表导入数据,除了首字段. insert into [新表](字段列表) select [字段列表] from 旧表 -- 3.删除旧表. drop table [旧表] -- 4.重命名新表. sp_rename '[新表名]','[旧表名]'
22,300
社区成员
121,734
社区内容
加载中
试试用AI创作助手写篇文章吧