Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Serial ID Auto Generation

By Larry Sumuri,

I was looking for ways to create the functionality to autogenerate customized serial IDs so I came up with this. It can be customized even further depending on you ID generation requirements.

To use this:

1. Create the table and stored procedure

2. Execute the stored procedure to autogenerate your serial ID.


The autogenerated ID can be saved again depending on what you a developing etc. etc.


Total article views: 1823 | Views in the last 30 days: 1
Related Articles

Autogenerating SSIS file import packages using Biml

Tired of building tons of similar SSIS packages for importing files into your data warehouse? Learn ...


AUTOGENERATE Stored procedures example

This is related to my other autogenerate code. this is just an example of how to use it.


Autogenerate dates

I'm sure someone has done this before, but I can't seem to find a thread regarding it. I've got a...



Comments posted to this topic are about the item [B]AUTOGENERATE INSERT UPDATE SELECT STATEMENTS[/B]...


AUTOGENERATE Stored procedures example

Comments posted to this topic are about the item [B]AUTOGENERATE Stored procedures example[/B] Plea...

autogenerate id    
generate id    
serial id    

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones