Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 6 of 6 total |
How i can reset the generated value ? |
Wed, Apr 13 2011 10:50 AM | Permanent Link |
Mauro Botta | Hi
EDB ..last... Delphi last.... i have in a table a ID Field GENERATED COLUMN "ID" INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1) NOT NULL add 100 records, i have ID value from 1 to 100, when i make a DELETE FROM MyTable , ( zap table ) this value is not reseted, if i add a record ID value is 101 , but i want 1. How i can reset the generated value ( saved in internal structure of table ) ? now.. i delete fisical file... but i'm looking a query mode |
Wed, Apr 13 2011 11:27 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Mauro
From an earlier post by Uli Becker in the sql newsgroup Have a look here: http://tinyurl.com/2v3m788 Roy Lambert [Team Elevate] |
Wed, Apr 13 2011 11:29 AM | Permanent Link |
Fernando Dias Team Elevate | Mauro,
ALTER TABLE "MyTable" ALTER COLUMN ID RESTART WITH 0 -- Fernando Dias [Team Elevate] |
Wed, Apr 13 2011 12:13 PM | Permanent Link |
Mauro Botta | Tnx at all.
> ALTER TABLE "MyTable" ALTER COLUMN ID RESTART WITH 0 is there a method without EXCLUSIVE access ? |
Wed, Apr 13 2011 1:49 PM | Permanent Link |
Fernando Dias Team Elevate | Mauro,
Not that I am aware of, and it wouldn't be safe to do such a change and not having the table locked. -- Fernando Dias [Team Elevate] |
Tue, Apr 19 2011 5:57 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Mauro,
<< when i make a DELETE FROM MyTable , ( zap table ) >> If you're always deleting all of the rows from the table, then the EMPTY TABLE statement will both delete all of the rows and reset all IDENTITY columns back to 0: http://www.elevatesoft.com/manual?action=viewtopic&id=edb2sql&topic=EMPTY_TABLE -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |