| Database Toolbox™ | ![]() |
k = primarykeys(dbmeta, 'cata',
'sch')
k = primarykeys(dbmeta, 'cata',
'sch', 'tab')
k = primarykeys(dbmeta, 'cata', 'sch') returns primary key information for all tables in:
The schema sch
Of the catalog cata
For the database whose database metadata object is dbmeta
k = primarykeys(dbmeta, 'cata', 'sch', 'tab') returns primary key information for:
The table tab
In the schema sch
Of the catalog cata
For the database whose database metadata object is dbmeta
Get primary key information for the DEPT table in:
The schema SCOTT
Of the catalog orcl
For the database metadata object dbmeta
k = primarykeys(dbmeta,'orcl','SCOTT','DEPT') k = 'orcl' 'SCOTT' 'DEPT' 'DEPTNO' '1' 'PK_DEPT'
The results show the primary key information as described in the following table.
| Column | Description | Value |
|---|---|---|
1 | Catalog | orcl |
2 | Schema | SCOTT |
3 | Table | DEPT |
4 | Column name of primary key | DEPTNO |
5 | Sequence number within primary key | 1 |
6 | Primary key name | PK_DEPT |
crossreference, dmd, exportedkeys, get, importedkeys
![]() | ping | procedurecolumns | ![]() |
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |