Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 2 of 2 total |
Generate column with an increment of -1?? |
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 Team Elevate | 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 Sunday, May 19, 2024 at 08:46 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |