Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add a column with 2 characters and a 7 digit auto incrementing number

Status
Not open for further replies.

MitchMitch

Programmer
Sep 12, 2006
2
0
0
US
I have a table with about 2 million records that I need to add a new key to. The key needs to be two letters (ML) and then a 7 digit number, starting with 1 and it auto increments. (ML0000001 for example)
Does anyone have suggestions on the easiest way to do this? It appears that Sybase doesn't have sequence's like Oracle, where I could do this easily.
Thanks!
Mitch
 
Also, I don't need tohe column to continue to autoincrement. I will do this in my code. I just said autoincrement to explain thatI don't want to have to increment it manually on initial input.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top