Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Ad Unique Code

Author  Topic 

Rheinhardt
Yak Posting Veteran

66 Posts

Posted - 2009-09-14 : 05:08:38
HI,

I have 2 columns.

Col 1 Col 2
43451 Powder
77652 Grain


The First Colum has a code but is is being truncated when I insert in system table(must be 3 length)...so I want to create a Unique code for the Column1

Col1 Col2 Col3
1 43451 Powder
2 77652 Grain

PLease assist

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-09-14 : 06:06:28
Use an IDENTITY column.
http://www.sqlteam.com/article/understanding-identity-columns
Go to Top of Page
   

- Advertisement -