Hi, > Is there a way to get the name of a sequence (or to force it when > creating the table) for an identity column? When we create a table > with an identity column, the sequence gets a unique name that cannot > be discovered it seems.
CREATE SEQUENCE TESTSEQ; CREATE TABLE TEST(ID INT DEFAULT NEXT VALUE FOR TESTSEQ PRIMARY KEY); There is a way to get the sequence name, but it is complicated. Basically you need to parse COLUMN_DEFAULT in: SELECT TABLE_NAME, COLUMN_NAME, COLUMN_DEFAULT FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_DEFAULT IS NOT NULL; Regards, Thomas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/h2-database?hl=en -~----------~----~----~----~------~----~------~--~---
