怎么写存储过程生成一批连续的数据,请高手指点。一点思路都没有。
解决方案 »
- CE与PC间数据库共享
- 去掉10%最高分最低分之后求平均值的统计,该如何实现?
- 存储过程提取立即提取不是自增列的主键,求高手赐教
- 有关sql clr的问题。
- 如何用sql语句索取行数
- 菜鸟问题:从visio数据库模型图怎样到---sqlserver
- 【急问!!】怎样新建一个能够访问本地SQL SERVER2000数据库的Win2000用户名?谢谢!【急问!!】
- 论坛出现这样的错误是怎么回事Microsoft OLE DB Provider for SQL Server 错误 '80040e14'
- 我想更新一条记录中的多个值,请问怎么写?
- 一对多,如何往多的一方加数据,同时更新少的一方
- 这样一个类层次的查询的sql怎么写
- 存储过程中的 OPENROWSET 问题(在线等)
select top 1000 id=identit(int,1,1) from sysobjects a join sysobjects b on 1=1 join sysobjects c on 1=1
select top 1000 id=identit(int,1,1) into # from sysobjects a join sysobjects b on 1=1 join sysobjects c on 1=1
select * from #
select id=100*a.id+10*b.id+c.id from
(select id=1 union select 2 union select 3 union select 4 union select 5
union select 6 union select 7 union select 8 union select 9 union select 0) a join
(select id=1 union select 2 union select 3 union select 4 union select 5
union select 6 union select 7 union select 8 union select 9 union select 0) b on 1=1 join
(select id=1 union select 2 union select 3 union select 4 union select 5
union select 6 union select 7 union select 8 union select 9 union select 0) c on 1=1
order by 100*a.id+10*b.id+c.id
CREATE TABLE tbl_1015700128_VIRTUALTEL
(
VirtualTel VARCHAR(20) NOT NULL,
TrueTel VARCHAR(20),
ActiveFlag numeric(3) DEFAULT 0,
CallerState numeric(3) DEFAULT 0,
CalleeState numeric(3) DEFAULT 0, CreateDate datetime,
BindDate datetime, UnbindDate datetime,
CONSTRAINT PK_VIRTUALTEL3 PRIMARY KEY(VirtualTel)
);
要生成一批连续的VirtualTel,怎么做啊?