SQL metadatos

SELECT c.constraint_name “llave foránea”,
p.constaint_name “llave referenciada”,
p.constraint_type,
p.owner,
p.table_name
FROM dba_constraints p, dba_constraints c
WHERE c.owner = ‘USUARIO1’
AND c.table_name = ‘ESTUDIANTES’
AND c.constraint_type = ‘R’
AND p.owner = c.r_owner
AND p.constraint_name = c.r_constraint_name;

Leave a Reply