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: 1806 | Views in the last 30 days: 2
 
Related Articles
SCRIPT

AUTOGENERATE Stored procedures example

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

FORUM

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...

FORUM

AUTOGENERATE INSERT UPDATE SELECT STATEMENTS

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

FORUM

AUTOGENERATE Stored procedures example

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

FORUM

Autogenerating a primarykey issue

Hi We have a production DB in SQL server 2005.In most of the table we generating the primary key th...

Tags
auto-generate    
autogenerate id    
generate id    
id    
serial id    
 
Contribute

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
Editor, SQLServerCentral.com

Already a member? Jump in:

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