This script will generate and populate a table variable with a stipulated number of unique 8 randomly generated character alphanumeric values. This can be useful in situations where one has to allocate passwords or unique id to users.
It accepts one input parameter "@HowMany int" representing the number of these alphanumeric values to generate; default=500.
Usage: EXEC dbo.GenerateRandomAlphaNumericIDs 50 --to generate 50 values or EXEC dbo.GenerateRandomAlphaNumericIDs --to generate the default 500 values.
A Normalization Primer
For most DBAs, normalization is an understood concept, a bread and butter bit of knowledge. However, it is not at all unusual to review a database design by a development group for an OLTP (OnLine Transaction Processing) environment and find that the schema chosen is anything but properly normalized. This article by Brian Kelley will give you the core knowledge to data model.
2003-01-13
18,596 reads