How to give name to an index, associated with constraint in H2?

246 views Asked by At

I am creating table with the following code:

CREATE TABLE ELEM
(
  ID INTEGER AUTO_INCREMENT NOT NULL,
  TYP_ID INTEGER,
  SPELL VARCHAR(50),
  CONSTRAINT ELEM_PK PRIMARY KEY (ID),
  CONSTRAINT ELEM_SK UNIQUE (ID, TYP_ID),
  CONSTRAINT ELEM_TYP_FK FOREIGN KEY (TYP_ID) REFERENCES TYP (ID)

);

in result I get indices with the names of PRIMARY_KEY_2, ELEM_TYP_FK_INDEX_2 and CONSTRAINT_INDEX_2. Can I control these names in CREATE TABLE statement?

0

There are 0 answers