Is there a way to add a column in my sql server db that is ging to auto increment? I would like to start at 000001 and work right on up. I can't see to find a way to do this. Thanks.Yes. Set that column as the "Identity column" for the table.|||you're the man!!! without having access to my DB now, is there a way to set the mask so I can have the leading zeros I would like?|||The identity column has to be of type int, so there is no such thing as "leading zeros", you can only set the initial value and the step. You should format the number in your application the way you want, or if you really insist on doing it in the DB, then do a view.|||
smalltalk:
The identity column has to be of type int, so there is no such thing as "leading zeros", you can only set the initial value and the step. You should format the number in your application the way you want, or if you really insist on doing it in the DB, then do a view.
awesome. The reason for the leading zeros is just for formatting consistancey, It's a ui thing rather than a database thing so I can just slap some 0's on there after I get the value from the database
No comments:
Post a Comment