循环更新sqlserver数据库表ID

DECLARE @a INT
DECLARE aaa CURSOR for select columnID from LNDB_COLUMN_INFO where columnID BETWEEN 223899 AND 224003
OPEN aaa
FETCH next from aaa into @a
WHILE @@fetch_status=0
BEGIN
print @a
update LNDB_COLUMN_INFO SET columnID=@a-223910 where columnID=@a
FETCH NEXT from aaa into @a
END
CLOSE aaa
DEALLOCATE aaa

上一篇:Linux 安装配置 tftp 服务器


下一篇:Java基础学习-HelloWorld案例的编写和运行