Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 7 of 7 total |
Reset the Autoinc field? |
Fri, Aug 2 2019 6:47 PM | Permanent Link |
Ian Branch | Hi Team,
I need to empty a Jobtickets table and reset the autoinc field, 'JobNo' back to 0 so the first record added is 1. I have looked at the few 'examples' in the forums but am still not sure what to code in SQL. Pls advise. Regards & TIA, Ian |
Fri, Aug 2 2019 9:02 PM | Permanent Link |
Terry Swiers | Hi Ian,
Tim has a FAQ on this at https://www.elevatesoft.com/supportfaq?action=view&category=edb&question=altering_identity_seed_value |
Fri, Aug 2 2019 9:11 PM | Permanent Link |
Ian Branch | Hi Terry,
Ahhh. Tks, I didn't read down far enough-( >> ALTER COLUMN MyIdentityColumn RESTART WITH <NewSeedValue> <NewSeedValue>? If I set that to 1, does that mean the next (first) record added will be # 1? Ian |
Sat, Aug 3 2019 9:46 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ian
><NewSeedValue>? If I set that to 1, does that mean the next (first) record added will be # 1? WIthout actually trying it the last paragraph <<This statement will properly reset the seed value for the IDENTITY column so that any newly-inserted rows will use the new seed value.>> makes me think so Toy |
Mon, Aug 5 2019 3:20 PM | Permanent Link |
Terry Swiers | ><NewSeedValue>? If I set that to 1, does that mean the next (first) record added will be # 1? If you set the SeedValue to 1, the next generated number will be 2. Terry |
Tue, Aug 6 2019 2:42 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Terry
You are right. I should have looked at how Tim has set it up in the create table dialog Roy Lambert |
Sat, Aug 24 2019 7:40 PM | Permanent Link |
Michael Riley ZilchWorks | >Hi Team,
>I need to empty a Jobtickets table and reset the autoinc field, 'JobNo' back to 0 so the first record added is 1. >I have looked at the few 'examples' in the forums but am still not sure what to code in SQL. >Pls advise. I believe EMPTY TABLE <TableName> will so what you are looking for. https://www.elevatesoft.com/manual?action=viewtopic&id=edb2sql&topic=EMPTY_TABLE Michael Riley GySgt USMC (Retired) www.zilchworks.com |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |