MATLAB DATABASE TOOLBOX RELEASE NOTES Guida Utente Pagina 461

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 684
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 460
crossreference
7-31
crossreference
Retrieve information about primary and foreign keys
Syntax
f = crossreference(dbmeta, 'pcata', 'psch', 'ptab', 'fcata', 'fsch',
'ftab')
Description
f = crossreference(dbmeta, 'pcata', 'psch', 'ptab', 'fcata', 'fsch',
'ftab') returns information about the relationship between foreign keys and primary
keys for the database whose database metadata object is dbmeta. The primary key
information is for the table ptab in the primary schema psch. The primary catalog is
pcata. The foreign key information is for the foreign table ftab in the foreign schema
fsch. The foreign catalog is fcata.
Examples
Run crossreference to get primary and foreign key information. The database
metadata object is dbmeta, the primary and foreign catalog is orcl, the primary and
foreign schema is SCOTT, the table that contains the referenced primary key is DEPT, and
the table that contains the foreign key is EMP.
f = crossreference(dbmeta,'orcl','SCOTT','DEPT',...
'orcl','SCOTT','EMP')
f = 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 the following primary and foreign key information.
Vedere la pagina 460
1 2 ... 456 457 458 459 460 461 462 463 464 465 466 ... 683 684

Commenti su questo manuale

Nessun commento