, / 9 (+1) ?
- , , 9 .
(. RMH), :
"" , ( 1 10) ( 1 9 000 000).
, , dataserver (, /, 9 000 000 ... tempdb, ... egad... / !).
- ...
declare @counter bigint, @max bigint
select @counter=0, @max=9000000
while @counter <= @max
begin
select @counter
select @counter=@counter+1
end
... tempdb, - , 9 . 9 1 , , , , , dataserver .
, , , , , - proc; , , , .
', , dataserver ( ) .
There may be some other ways in which Sybase / ASE can generate a series of numbers (for example, create / populate a table with an identity column), but this will require either a) a good bit of dataserver resources, or b) some convoluted code (for example, functions application context, plug-in Java code) ... to do something that is more efficiently handled by the client / front-end application.
markp source
share