设为首页 加入收藏

TOP

sql sever循环插入数据
2014-11-24 01:33:44 来源: 作者: 【 】 浏览:6
Tags:sql sever 循环 插入 数据
create table s
(
id int identity(1,1),
name varchar(10)
)
select * from s where id>1500
insert into s values('asd')
declare @s varchar(2000)
declare @n varchar(2000)
set @n='n'
declare @a int
set @a=0
while (@a<500)
begin
select @a+=1
select @s=@n+CONVERT(varchar(2000),@a)
insert into s values(@s)
end
create clustered index index_id on
s (id) with fillfactor=50
create nonclustered index ix_name on s (name)
select * from s where name='n151'
select * from s where id>1500
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇SQL2005无法启动SQL Server 请求.. 下一篇SQL Server 2005无法在COM+目录中..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: