Jeff's SQL Server Blog

Random Thoughts & Cartesian Products with Microsoft SQL Server
posts - 155, comments - 2679, trackbacks - 64

My Links



Welcome to my weblog. My name is Jeff Smith, I am software developer in Boston, MA and I was recently named a 2009 SQL Server MVP. Check in frequently for tips, tricks, commentary and ideas on SQL Server and .NET programming.



Post Categories




Custom Auto-Generated Sequences in SQL Server

Be sure to visit to check out my latest article, Custom Auto-Generated Sequences in SQL Server.  It addresses a common question we see in the SQL Team forums. 

From the intro:

This article by Jeff Smith covers different ways to create sequence numbers. It starts with the basic identity and GUIDs and quickly moves to much more complicated sequence numbers including those with auto-incrementing mixed letters and numbers such as "A0001", etc. Jeff shows one of the easiest ways I've ever seen to efficiently handle very odd sequence numbers.

In other words, if you want your database to assign customer numbers formatted like "AB-023" automatically, this is the article for you.


see also:

Print | posted on Tuesday, April 24, 2007 8:36 AM | Filed Under [ T-SQL Database Design Links ]



# re: Custom Auto-Generated Sequences in SQL Server

Stop calling yourself software developer, you're only PC scripting language user, as Microsoft wanted you to be.
5/19/2007 7:28 PM | George King Sr.

# re: Custom Auto-Generated Sequences in SQL Server

please give me the autogeneration code in sqlserver
8/18/2008 12:17 PM | Asit kumar bihari

# re: Custom Auto-Generated Sequences in SQL Server

This is good
9/11/2009 2:22 AM | Polelo
Comments have been closed on this topic.

Powered by:
Powered By Subtext Powered By ASP.NET