Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HSQLDB list all constraints

Does anyone know how to list all constraints, or query for a particular Foreign Key constraint e.g. FK1234567890 in HSQLDB?

In other databases there are special system tables for this, but I can't find anything on the docs for this one.

Thanks, N.

like image 926
Nikolaos Avatar asked Apr 02 '11 11:04

Nikolaos


2 Answers

HSQLDB system tables are listed in the Guide

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

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

like image 110
fredt Avatar answered Nov 10 '22 06:11

fredt


Here is a clear text version of above explanation, that really works for my:

       SELECT * FROM INFORMATION_SCHEMA.SYSTEM_TABLE_CONSTRAINTS
like image 30
primehunter Avatar answered Nov 10 '22 06:11

primehunter