Table usage
get_table_usageIdentifies all foreign keys, views, procedures, and functions that reference a table, enabling impact analysis before schema changes.
Instructions
Lists everything that references one table: foreign keys to and from it, and the views, procedures and functions whose code uses it. Use it for impact analysis before changing a table; for the dependency graph of the whole database use get_dependency_graph. sql_module_usage is null when the login cannot read dependencies, and 'visibility' says when the list may be incomplete.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Table name, bare, with no schema prefix. | |
| schema | No | Table schema. Empty searches every schema. Example: 'Feeder' | |
| database | Yes | Name of the database as registered in the configuration. |