Google News
logo
HSQLDB - Interview Questions
How do you specify a foreign key constraint in an HSQLDB table?
You can specify a foreign key constraint in an HSQLDB table by including the FOREIGN KEY keyword followed by the column name(s) in parentheses and the referenced table and column name(s) in parentheses after the column definition. For example:
CREATE TABLE table_name (
column1 INT PRIMARY KEY,
column2 INT,
…
FOREIGN KEY (column2) REFERENCES referenced_table (referenced_column)
);?
Advertisement