Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
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: MSSQLTips.com | Category: generate numbers
Rating: (not yet rated)  Rate this |   Briefcase | 3,593 reads

Generate N sequential numbers (fast)

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