SHOW DEPENdencies or SHOW DEPENdency
SHOW {DEPENdencies | DEPENdency} object_name
These commands display all dependencies for the specified object name supplied as a parameter.The object name supplied need not necessarily be a table name, it could be a function or procedure name, a sequence name etc.
The output listed is a comma-separated list of the other objects in the database upon which the supplied object is dependent.In other words, a procedure would fail to compile if any of the listed dependencies was to be removed, for example.
SQL> show dependencies SET_CUST_NO;
[SET_CUST_NO:Trigger]
CUSTOMER:Table<-CUST_NO, CUST_NO_GEN:Generator
+++
The listing above shows that SET_CUST_NO is a trigger and that it is dependent on two separate objects, the CUST_NO column of table CUSTOMER, and the sequence (generator) named CUST_NO_GEN.If you display the trigger itself, you will see both of those objects mentioned:
SQL> show trigger set_cust_no;
Triggers on Table CUSTOMER:
SET_CUST_NO, Sequence: 0, Type: BEFORE INSERT, Active
Trigger text:
=============================================================================
AS
BEGIN
if (new.cust_no is null) then
new.cust_no = gen_id(cust_no_gen, 1);
END
=============================================================================
Sometimes, the output can be a little confusing.You may see various objects in the list that don’t appear to be relevant.The RDB$DEPENDENCIES table, where the data comes from, also holds details of system objects upon which a given object will depend.