Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Altering SEED Value is ignored
Mon, Jun 23 2008 4:23 PMPermanent Link

Ralf Graap
Hey Tim,

if i try to change the seed-Value of the id-column via "alter
Table"-Dialog, nothing happens...

this SQL is generated and ignored:

ALTER TABLE "Test"
ALTER COLUMN "Id" AS INTEGER GENERATED ALWAYS AS IDENTITY (START WITH
600, INCREMENT BY 1)


Ralf
Tue, Jun 24 2008 9:54 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ralf,

<< if i try to change the seed-Value of the id-column via "alter
Table"-Dialog, nothing happens...

this SQL is generated and ignored: >>

What do you expect to happen ?  If you're expecting the next value to be
assigned as 600, then that is not what will happen.  When you use ALTER
COLUMN, you're specifying what the *initial* seed value should be *before*
the rows are processed in the ALTER TABLE.  The processing of the rows
causes the seed value to increment accordingly, based upon the data in the
altered column for each row.

Perhaps what you want is the RESTART WITH clause, which will reset the seed
value and leave it there:

ALTER TABLE "Test"
ALTER COLUMN "Id" RESTART WITH 600

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Jun 25 2008 5:39 PMPermanent Link

Ralf Graap
Tim Young [Elevate Software] schrieb:
> Perhaps what you want is the RESTART WITH clause, which will reset the seed
> value and leave it there:
>
> ALTER TABLE "Test"
> ALTER COLUMN "Id" RESTART WITH 600

Hey Tim,

the RESTART is exactly what i'am searching for... in SQL Smile
Is there any way to do this via the "alter Table"-Dialog of the EDBMgr?

Thx
 Ralf
Thu, Jun 26 2008 10:53 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ralf,

<< the RESTART is exactly what i'am searching for... in SQL SmileIs there any
way to do this via the "alter Table"-Dialog of the EDBMgr? >>

Not at the moment, no.  I'm considering it as an infrequent operation, so
I've left it out at the moment.  Plus, I haven't figured out a way to work
it into the existing Alter Table dialog yet either. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Image