Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Content with tag generate numbers Rss

   Items 1 to 2 of 2   

Generating Random Numbers in SQL Server Without Collisions

From time to time, I see a requirement to generate random identifiers for things like users or orders. People want to use random numbers so that the "next" identifier is not guessable, or to prevent insight into how many new users or orders are being generated in a given time frame, but they don't want to run into any duplicates. We can trade a bit of disk space and relatively predictable (but not optimal) performance for the guarantee of no collisions, no matter how many random numbers we've already used.   Read more...
By Additional Articles 2013/09/27 | Source: | Category: generate numbers
Rating: (not yet rated)  Rate this |   Briefcase | 3,683 reads

Generate N sequential numbers (fast)

Use ROW_NUMBER() to efficiently generate a tally table. 
By Brian Bates 2013/06/13 | Source: | Category: tally table
Rating: |  Discuss |   Briefcase | 1,630 reads
   Items 1 to 2 of 2   
tally table (1)