sql >> Databasteknik >  >> RDS >> Oracle

Hur identifierar man programmässigt en lagrad procedurs beroenden?

denna sida , hittar du följande fråga som använder PUBLIC_DEPENDENCY ordbokstabell:

 SELECT lvl
     , u.object_id
     , u.object_type
     , LPAD (' ', lvl) || object_name obj
   FROM ( SELECT LEVEL lvl, object_id
            FROM SYS.public_dependency s
         START WITH s.object_id =
                      ( SELECT object_id
                          FROM user_objects
                         WHERE object_name = UPPER ('&OBJECT_NAME')
                           AND object_type = UPPER ('&OBJECT_TYPE'))
         CONNECT BY s.object_id = PRIOR referenced_object_id
         GROUP BY LEVEL, object_id) tree
      , user_objects u
  WHERE tree.object_id = u.object_id
ORDER BY lvl
/


  1. SQL select where not in subquery returnerar inga resultat

  2. Utarbetat uttalande om Postgresql i Rails

  3. MySQL VS Postgres/POSTGIS stöd för spatial databas

  4. SQL-prestanda på LEFT OUTER JOIN vs NOT EXISTS