Share via


IDatabaseMetaData.GetPrimaryKeys(String, String, String) Method

Definition

Retrieves a description of the given table's primary key columns.

[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 Java.Sql.IResultSet? GetPrimaryKeys (string? catalog, string? schema, string? table);
[<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")>]
abstract member GetPrimaryKeys : string * string * string -> Java.Sql.IResultSet

Parameters

catalog
String

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
String

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
String

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

Attributes

Exceptions

a database error occurred.

Remarks

Retrieves 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: <OL> <LI><B>TABLE_CAT</B> String => table catalog (may be null) <LI><B>TABLE_SCHEM</B> String => table schema (may be null) <LI><B>TABLE_NAME</B> String => table name <LI><B>COLUMN_NAME</B> String => column name <LI><B>KEY_SEQ</B> short => 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 null) </OL>

Java documentation for java.sql.DatabaseMetaData.getPrimaryKeys(java.lang.String, java.lang.String, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to