Java.Sql.IDatabaseMetaData.GetPrimaryKeys Method
Returns a list of the primary key columns of a specified table.

Syntax

[Android.Runtime.Register("getPrimaryKeys", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/sql/ResultSet;", "GetGetPrimaryKeys_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Handler:Java.Sql.IDatabaseMetaDataInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public IResultSet GetPrimaryKeys (string catalog, string schema, string table)

Parameters

catalog
a catalog name. null is used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with the empty string used to retrieve those without a catalog name.
schema
a schema name. null is used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with the empty string used to retrieve those without a schema name.
table
the name of a table, which must match the name of a table in the database.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Sql.SQLExceptiona database error occurred.

Remarks

Returns a list of the primary key columns of a specified table.

The list is returned as a ResultSet with one row for each primary key column, ordered by COLUMN_NAME, with each row having the structure as follows:

  1. TABLE_CAT - String - table catalog name (possibly null)
  2. TABLE_SCHEM - String - table schema name (possibly null)
  3. TABLE_NAME - String - The table name
  4. COLUMN_NAME - String - The column name
  5. KEY_SEQ - short - the sequence number for this column in the primary key
  6. PK_NAME - String - the primary key name (possibly null)

[Android Documentation]

Requirements

Namespace: Java.Sql
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1