FIND FK

Core command FIND REFERENCE FIND REFERENCES FI FK FIFK

Finds foreign keys whose name, tables or columns contain the input text

Arguments

<text> (mandatory) part of a constraint, table or column name

Examples

FIND FK CUSTOMER;

Notes

Finds foreign keys by name, table or column: FIND FK <text>, also available as FIND REFERENCE <text>.

Lists every foreign key of the current schema whose constraint name, referencing table, referencing column, referenced table or referenced column contains the text. Matching ignores case, and, as with FIND COLUMN, % matches any sequence of characters and _ any single character. One row per column pair, with the key position (#); every column of a matching composite foreign key is listed, even when only one of them matched.

Uses the same metadata as SHOW FK and SHOW REFERENCES, read for each table of the current schema, so a large schema takes a moment. Fails with an error if no text is given or if the JDBC driver cannot provide foreign key metadata.

Last modified in release 5.3.1.