Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 2 of 2 total |
Insert into an autoinc field? |
Sun, Dec 1 2019 9:22 PM | Permanent Link |
Ian Branch | Hi Guys,
My Customer has inadvertently deleted a record with an autoinc field. Can I insert a record to replace the missing one/autoinc field? Regards & TIA, Ian |
Mon, Dec 2 2019 8:45 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ian
Simple answer - NO More complex answer - YES - change the column to INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0, INCREMENT BY 1) NOT NULL! and then it can be edited. SO you add a new record, alter the autoinc to whatever you want and then alter the start point for the column back to the one that should be next (otherwise you'll still have a gap). You have already been given the info you need to reset the seed value. Roy Lambert ps - ALL my autoincs are set as by default rather than always - since I generally supply no way for a typical user to edit they don't get screwed around but it goves me these sort of options |
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 |