December 4, 2007 at 8:47 am
Hello
I have created a table with serveral columns which have primary keys. What I want to do is to modify the table to so that whenever a record is inserted, the start value can be 5 and tne next 15 (increment value of 10)
I have googles the net and can only see create sequence which doesnt seem work at all (thinking its an oracle thing)
I need some help to learn how to create such T-SQL scripts from anyone who has done it.
December 4, 2007 at 8:52 am
Read up on IDENTITY Columns. you'll find your answer there.
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgDecember 4, 2007 at 11:08 am
Thanks, eventually found what i needed to do. I needed to create the table in this format:
CREATE TABLE dbo.tablename( columnname1 smallint identity(7,2), columnname2 char(20) )
Viewing 0 posts
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy