Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Resetting an Identity value
Wed, Nov 9 2011 6:41 AMPermanent Link

Adam Brett

Orixa Systems

I had assumed that SQL like this:


ALTER TABLE Customer
ALTER COLUMN "ID" AS INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 510000, INCREMENT BY 1) NOT NULL

Would result in resetting the IdentitySeed for the table to 510000, so that new records after that point would have IDs of 510000, 510001 etc.

However it doesn't ... the table continues to insert from whatever the previous Seed value was. How do I reset this?
Wed, Nov 9 2011 7:46 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Adam


Check out http://tinyurl.com/2v3m788

Roy Lambert [Team Elevate]
Wed, Nov 9 2011 10:09 AMPermanent Link

Adam Brett

Orixa Systems

Thanks Roy!

... I didn't think to look in the On-line FAQ!

I checked through the SQL Reference (EDBMgr Help File) before I posted here & there is no reference to RESTART in there.

... Tim (or others at EDB) I think RESTART ought to be mentioned in the Reference.
Wed, Nov 9 2011 10:32 AMPermanent Link

Raul

Team Elevate Team Elevate

The syntax does cover it (at least in online version)  :

http://www.elevatesoft.com/manual?action=viewtopic&id=edb2sql&topic=ALTER_TABLE

[ALTER [COLUMN] <ColumnName> <ColumnAlterOptions>|AS <ColumnDefinition>
and
<ColumnAlterOptions> =
[SET <DefaultExpression>|DROP DEFAULT|DESCRIPTION <Description>|
MOVE TO <ColumnPos>|RESTART WITH <SeedValue>]

Raul


<<
Adam Brett wrote:

Thanks Roy!

... I didn't think to look in the On-line FAQ!

I checked through the SQL Reference (EDBMgr Help File) before I posted here & there is no reference to RESTART in there.

... Tim (or others at EDB) I think RESTART ought to be mentioned in the Reference.
>>
Wed, Nov 9 2011 10:43 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Adam


>.. I didn't think to look in the On-line FAQ!
>
>I checked through the SQL Reference (EDBMgr Help File) before I posted here & there is no reference to RESTART in there.

And what about searching the newsgroup for "seed" Smiley

Roy Lambert
Image