Skip to main content
6 events
when toggle format what by license comment
Mar 13, 2023 at 11:31 history edited Paul White CC BY-SA 4.0
deleted 28 characters in body
Oct 25, 2015 at 11:34 comment added Dan Guzman @VladimirBaranov, I completely agree NEWID isn't adequate for cryptography but that is not the use case here. CRYPT_GEM_RANDOM is a good idea to use here though, since it eliminates the SUBSTRING ugliness.
Oct 25, 2015 at 10:14 comment added Vladimir Baranov NEWID() was never meant to be a random number generator, so it is not clear what distribution you'll get for random numbers generated this way. Since SQL Server 2008 there is CRYPT_GEN_RANDOM that may be easier to use (you can specify the length of the generated number in bytes) and which produces "better" (cryptographically) random numbers.
Oct 24, 2015 at 16:55 history edited Dan Guzman CC BY-SA 3.0
added 673 characters in body
Oct 24, 2015 at 16:48 vote accept H. Pauwelyn
Oct 24, 2015 at 16:28 history answered Dan Guzman CC BY-SA 3.0