| Database Toolbox | ![]() |
Get indices and statistics for database table
Syntax
x = indexinfo(dbmeta, 'cata', 'sch', 'tab')
Description
x = indexinfo(dbmeta, 'cata', 'sch', 'tab')
returns the indices and statistics for the table tab, in the schema sch, of the catalog cata, for the database whose database metadata object is dbmeta, where dbmeta was created using dmd.
Examples
x = indexinfo(dbmeta,'','SCOTT','DEPT')
x =
Columns 1 through 8
'orcl' 'SCOTT' 'DEPT' '0' 'null' 'null' '0' '0'
'orcl' 'SCOTT' 'DEPT' '0' 'null' 'PK_DEPT' '1' '1'
Columns 9 through 13
'null' 'null' '4' '1' 'null'
'DEPTNO' 'null' '4' '1' 'null'
dbmeta is the database metadata objectorcl is the catalog cataSCOTT is the schema schDEPT is the table tabThe results contain two rows, meaning there are two index columns. The statistics for the first index column are shown in the following table.
For more information about the index information, see
http://java.sun.com/products/jdk/1.2/docs/api/java/sql/package-summary.html for a description of the DatabaseMetaData object property getIndexInfo.
| importedkeys | insert | ![]() |