只若初见

数据库循环语句

电脑版发表于:2020/6/10 16:40

在数据库中可以使用循环添加数据

declare @count int;
set @count =1
while @count<50
begin
 insert Users values('猪'+CAST(@count as nvarchar)+'戒','net'+CAST(@count as nvarchar),'java',1,'mmmm','oooo')
 set @count =@count+1;
end


关于TNBLOG
TNBLOG,技术分享。技术交流:群号677373950
ICP备案 :渝ICP备18016597号-1
App store Android
精彩评论
{{item.replyName}}
{{item.content}}
{{item.time}}
{{subpj.replyName}}
@{{subpj.beReplyName}}{{subpj.content}}
{{subpj.time}}
猜你喜欢