![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 2 of 2 total |
![]() |
Sat, Nov 26 2022 1:57 AM | Permanent Link |
Ian Branch | Hi Team,
Can I create a 'autoinc' column which 'increases by -1? I need the ID field to go -1, -2, -3, etc. Regards & TIA, Ian |
Sat, Nov 26 2022 7:24 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Ian
I don't think you can but if you don't mind a bit of redundancy you could create a GENERATED or COMPUTED column and reference that. A computed column wouldn't take up any more disk space and (I think) should not be susceptible to change by the user. Don't know if it can be used as the primary key but it can be used in an index. Another alternative if to have a before post trigger which calculates a value for you - the only issue is maintaining the net id number. Finally, if its just for display purposes, simply define a descending index using the normal autoinc. Roy Lambert |
This web page was last updated on Wednesday, July 2, 2025 at 06:46 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |