Ok, here is the steps.  First, you right click the table in the database
that you want to modify.

You click "Modify" to open up the edit table window.

Click on the column that you want to be auto incremented.

You will see at the bottom of the window a tab that says "Column
Properties."

Under that table will be a line item that says "Identity Specification."  It
has a plus sign next to it.  Click the plus sign to see the properties of
the identity seed.

To make it an indentity, which is SQL Server for auto increment, you need to
change Is Identity to "Yes."

This will turn on auto increment and you can change the starting number.

As a reminder, identity seed columns cannot be null and make sure you see a
key symbol next to the column for Primary Key as that will automatically
create a unique clustered index on that column.

Teddy

On 1/17/07, Nick G <[EMAIL PROTECTED]> wrote:
>
> I did not create the table; I just have to modify. I'm assuming that both
> of my fields are automatically incremented when a new record is entered. I
> was thinking that that just required a seperate sequence and trigger (for
> solnum)...there are ones already for the primary key (empnumid). Would that
> work?
>
>
> >On 1/16/07, Nick G <[EMAIL PROTECTED]> wrote:
> >>
> >> I hope this is not a newbie question...I'm not much of a DB person. I
> need
> >> to update or modify a table to make two fields to be unique (empnumid
> and
> >> solnum). The empnumid is the primary key and there is no foriegn key.
> Thanks
> >> for taking a look!
> >
> >
> >An unique index would work if I understand the question correctly.
> >
> >Just a point of reference though, I know empnumid means something to you,
> >but you might be better off being a little more explicit with your table
> >definition.  It makes your db structure easier to remember and understand
> >for years to come.  employee_id (assuming that empnumid is employee
> >something or other;) makes more sense when you are looking at it than
> >empnumid.  Although, maybe that's just my own way of looking at things.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2680
Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6

Reply via email to