declare @i intset @i=1000
while @i<1000
insert into project select 'id','name','parintid'
set @i=@i+1
end
while @i<1000
insert into project select 'id','name','parintid'
set @i=@i+1
end
解决方案 »
- SQL查询结果汇总
- 问个简单的sql语句
- 小问题~~
- 请大家看看一下这句SQL语句错误在什么地方??
- 高手,请看一下这条语句怎么写?
- 有多少程序员一般选择用ODBC数据源连接数据库?
- 请问SQLSERVER里是否有类似于MYSQL中的PassWord函数啊?
- 服务器为Win2000 Server,客户端为Win98,是否可以使用SQL Server?
- 简单问题来看看,关于在FUNCTIN中用GETDATE的问题
- sql存储过程出错了,主要是为了实现数据导入(导入要过滤的,譬如导入产品的表要是没有店铺名称,需要将数据以Excel的方式再导出,导入还要对关联的表操作)
- 在哪里查看得到 逻辑读 物理读 ?
- [请教一个问题]不能用union的一句sql语句
while @i<1000
insert into project select 'id','name','parintid'
set @i=@i-1 减1
end
while @i>0
insert into project select 'id','name','parintid'
set @i=@i-1
enddeclare @i intset @i=0
while @i<1000
insert into project select 'id','name','parintid'
set @i=@i+1
end
values('','','')
where max(id) <=1000在这里我将id 设置成自动增长的
@counter int,
@str_var varchar(10)
set @counter=1
while @counter<1001
begin
insert into t6 (id,name,parentID) values (@counter,'Name',12)
set @counter=@counter+1
end
order by colid