User`s guide
7 Functions — Alphabetical List
7-160
importedkeys
Return information about imported foreign keys
Syntax
i = importedkeys(dbmeta, 'cata', 'sch')
i = importedkeys(dbmeta, 'cata', 'sch', 'tab')
Description
i = importedkeys(dbmeta, 'cata', 'sch') returns foreign imported key
information, that is, information about fields that reference primary keys in other tables,
in the schema sch, of the catalog cata, for the database whose database metadata object
is dbmeta.
i = importedkeys(dbmeta, 'cata', 'sch', 'tab') returns foreign imported key
information in the table tab. In turn, fields in tab reference primary keys in other tables
in the schema sch, of the catalog cata, for the database whose database metadata object
is dbmeta.
Examples
Get foreign key information for the schema SCOTT in the catalog orcl, for dbmeta.
i = importedkeys(dbmeta,'orcl','SCOTT')
i =
Columns 1 through 7
'orcl' 'SCOTT' 'DEPT' 'DEPTNO' 'orcl'...
'SCOTT' 'EMP'
Columns 8 through 13
'DEPTNO' '1' 'null' '1' 'FK_DEPTNO'...
'PK_DEPT'
The results show foreign imported key information as described in the following table.