public ResultSet getPrimaryKeys(String catalog, String schema,
                                    String table) throws SQLException {

        if (table == null) {
            throw Util.nullArgument("table");
        }
        schema = translateSchema(schema);

        StringBuffer select =
            toQueryPrefix("SYSTEM_PRIMARYKEYS").append(and("TABLE_CAT", "=",
                catalog)).append(and("TABLE_SCHEM", "=",
                                     schema)).append(and("TABLE_NAME", "=",
                                         table));

        // By default, query already returns result in contract order
        return execute(select.toString());
    }
public ResultSet getPrimaryKeys ( String catalog , String schema , String table ) throws SQLException { if ( table == null ) { throw Util . nullArgument ( "table" ) ; } schema = translateSchema ( schema ) ; StringBuffer select = toQueryPrefix ( "SYSTEM_PRIMARYKEYS" ) . append ( and ( "TABLE_CAT" , "=" , catalog ) ) . append ( and ( "TABLE_SCHEM" , "=" , schema ) ) . append ( and ( "TABLE_NAME" , "=" , table ) ) ; return execute ( select . toString ( ) ) ; }
Retrieves a description of the given table's primary key columns.  They
are ordered by COLUMN_NAME.

<P>Each primary key column description has the following columns:
<OL>
<LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)
<LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)
<LI><B>TABLE_NAME</B> String => table name
<LI><B>COLUMN_NAME</B> String => column name
<LI><B>KEY_SEQ</B> short => (JDBC4 Clarification:) sequence number within primary key( a value
of 1 represents the first column of the primary key, a value of 2 would
represent the second column within the primary key).
<LI><B>PK_NAME</B> String => primary key name (may be <code>null</code>)
</OL>

<!-- start release-specific documentation -->
<div class="ReleaseSpecificDocumentation">
<h3>HSQLDB-Specific Information:</h3> <p>

HSQLDB supports the SQL Standard. It treats unquoted identifiers as
case insensitive in SQL and stores
them in upper case; it treats quoted identifiers as case sensitive and
stores them verbatim. All JDBCDatabaseMetaData methods perform
case-sensitive comparison between name (pattern) arguments and the
corresponding identifier values as they are stored in the database.
Therefore, care must be taken to specify name arguments precisely
(including case) as they are stored in the database. <p>

Since 1.7.2, this feature is supported by default. If the jar is
compiled without org.hsqldb_voltpatches.DatabaseInformationFull or
org.hsqldb_voltpatches.DatabaseInformationMain, the feature is
not supported. The default implementation is
{@link org.hsqldb_voltpatches.dbinfo.DatabaseInformationFull}.
</div>
<!-- end release-specific documentation -->

@param catalog a catalog name; must match the catalog name as it
is stored in the database; "" retrieves those without a catalog;
<code>null</code> means that the catalog name should not be used to narrow
the search
@param schema a schema name; must match the schema name
as it is stored in the database; "" retrieves those without a schema;
<code>null</code> means that the schema name should not be used to narrow
the search
@param table a table name; must match the table name as it is stored
in the database
@return <code>ResultSet</code> - each row is a primary key column description
@exception SQLException if a database access error occurs
@see #supportsMixedCaseQuotedIdentifiers
@see #storesUpperCaseIdentifiers