Hi, > The CONSTRAINT_NAME column is null on foreign key constraints.
You are right, it is null in the INDEXES table. This is a bug, I will fix it in the next release. However it's correct in the CONSTRAINTS table: drop all objects; create table parent(id int primary key); create table child(id int, parent_id int, constraint child_parent foreign key (parent_id) references parent(id)); select constraint_name from INFORMATION_SCHEMA.CONSTRAINTS where table_name = 'CHILD' and constraint_type = 'REFERENTIAL'; > The same happens for foreign key constraint names. > I am unable to retrieve the original name using the JDBC metadata API. That should be in column FK_NAME in http://www.h2database.com/javadoc/org/h2/jdbc/JdbcDatabaseMetaData.html#getCrossReference_String_String_String_String_String_String also getImportedKeys and getExportedKeys. 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.
