I am trying to create a table with an ID field that will be purged at the end of the procedure ( or beginning of next). the data will need to be sorted by a date field. The issue that i'm having is that i need the ID field to always start at 1 when new data is inserted.
I have tried
1) select "$rowid$",..... from "Test1" order by UpdateDT...
however this doesn't work with the order by clause
2)
CREATE COLUMN TABLE "Test2"
(LOT_ID INT NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
....)
however this doesn't start back at 1 when i rerun the insert