Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@katzyn
Copy link
Contributor

@katzyn katzyn commented Jan 17, 2022

For EclipseLink.

@gloyEY
Copy link

gloyEY commented Mar 3, 2022

What do you mean? How do I have to create a table with an IDENTITY KEY?

@katzyn
Copy link
Contributor Author

katzyn commented Mar 4, 2022

These defective by design functions incorrectly used by EclipseLink aren't related with column definitions in any way.

How do I have to create a table with an IDENTITY KEY?

There is no such thing as identity key in SQL (at least in the Standard and in H2), but there are identity columns and primary key columns. An identity column can (and usually should) have a primary key constraint and it can be defined with standard-compliant

CREATE TABLE TEST(
    ID BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY
);

https://h2database.com/html/grammar.html#column_definition

or with some legacy vendor-specific syntax (see documentation of compatibility modes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants