set @sql = N'select no=identity(int,1,1),id,stepCode,lcType,clgclj,zhcl_sj into ##ls_jtsjtable from ' + @tblName + N' where isEnd=0 and isdelete=0'
exec sp_executesql @sql这里no=identity(int,1,1)是我向要的连续编号的NO,id是原来的表中的自增列,可是提示说已经以后了ID,不可在添加NO,有什么办法解决吗?
exec sp_executesql @sql这里no=identity(int,1,1)是我向要的连续编号的NO,id是原来的表中的自增列,可是提示说已经以后了ID,不可在添加NO,有什么办法解决吗?
exec sp_executesql @sqlidentity(int,1,1)
你括号有错
drop column 自增列或者
alter table A
ALTER COLUMN 自增列 int