getPrimaryKeys()

Previous Next

Gets a description of a table's primary key columns. They are ordered by COLUMN_NAME.

Each primary key column description has the following columns:

TABLE_CAT

String

table catalog (may be null)

TABLE_SCHEM

String

table schema (may be null)

TABLE_NAME

String

table name

COLUMN_NAME

String

column name

KEY_SEQ

Short

sequence number within primary key

PK_NAME

String

primary key name (may be null)

 

Syntax

getPrimaryKeys(string catalog, string schema, string table)

Parameters

catalog

A catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria

schema

A schema name; "" retrieves those without a schema

table

A table name