$sql.metaData.getPrimaryKeys

Retrieves a description of the given table's primary key columns.
Syntax
    $sql.metaData.getPrimaryKeys{jdbcProfileName}{String catalog}{String schema}{String table}
DocumentationRetrieves a description of the given 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)

:

    Paramter:
      catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
      schema - a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
      table - a table name; must match the table name as it is stored in the database
    Returns:
      ResultSet - each row is a primary key column description
    Throws:
      SQLException - if a database access error occurs
Examples
GroupSQL
Minimum required transaction-mode:NONE
Required scripting permission of the developerPERMISSION_FL_BASIC
Minimum parameters4
Maximum parameters 4