HSQLDB lists all restrictions

Does anyone know how to list all constraints or request a specific foreign key constraint, for example. FK1234567890 in HSQLDB?

In other databases there are special system tables for this, but I can not find anything in the documents for this.

Thanks N.

+5
source share
3 answers

HSQLDB system tables are listed in the manual.

http://hsqldb.org/doc/2.0/guide/databaseobjects-chapt.html#dbc_information_schema

The INFORMATION_SCHEMA.TABLE_CONSTRAINTS view has general information. Other tables list the columns used in constraints.

+8
source

, :

       SELECT * FROM INFORMATION_SCHEMA.SYSTEM_TABLE_CONSTRAINTS
+7

You can find contraint FK1234567890using this SQL:

SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS 
    WHERE CONSTRAINT_NAME = 'FK1234567890'

To see the columns associated with the constraint:

SELECT * FROM INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE 
    WHERE CONSTRAINT_NAME like 'FK1234567890'
+1
source

All Articles