SHOW PK

Core command SHOW PRIMARY KEYS SH PK SHPK

Shows the primary keys for a given table name

Arguments

valid table name (mandatory)

Examples

SHOW KEYS CUSTOMER;

Notes

Lists the primary key columns of a table: SHOW PK <tableName>.

tableName is mandatory and may be schema-qualified (e.g. `SHOW PK PUBLIC.CUSTOMER). Unlike DESCR`, the name is used exactly as typed - it is not retried in upper or lower case - so it must match the table's actual name. No wildcards are supported.

Fails with an error if no table name is given, or if the table doesn't exist.

Last modified in release 4.9.8.