IDatabaseMetaData.GetExportedKeys(String, String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves a description of the foreign key columns that reference the given table's primary key columns (the foreign keys exported by a table).
[Android.Runtime.Register("getExportedKeys", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/sql/ResultSet;", "GetGetExportedKeys_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? GetExportedKeys (string? catalog, string? schema, string? table);
[<Android.Runtime.Register("getExportedKeys", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/sql/ResultSet;", "GetGetExportedKeys_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 GetExportedKeys : string * string * string -> Java.Sql.IResultSet
Parameters
- catalog
- String
a catalog name; must match the catalog name as it
is stored in this 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 this database
Returns
a ResultSet
object in which each row is a
foreign key column description
- Attributes
Exceptions
a database error occurred
Remarks
Retrieves a description of the foreign key columns that reference the given table's primary key columns (the foreign keys exported by a table). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ.
Each foreign key column description has the following columns: <OL> <LI><B>PKTABLE_CAT</B> String => primary key table catalog (may be null
) <LI><B>PKTABLE_SCHEM</B> String => primary key table schema (may be null
) <LI><B>PKTABLE_NAME</B> String => primary key table name <LI><B>PKCOLUMN_NAME</B> String => primary key column name <LI><B>FKTABLE_CAT</B> String => foreign key table catalog (may be null
) being exported (may be null
) <LI><B>FKTABLE_SCHEM</B> String => foreign key table schema (may be null
) being exported (may be null
) <LI><B>FKTABLE_NAME</B> String => foreign key table name being exported <LI><B>FKCOLUMN_NAME</B> String => foreign key column name being exported <LI><B>KEY_SEQ</B> short => sequence number within foreign key( a value of 1 represents the first column of the foreign key, a value of 2 would represent the second column within the foreign key). <LI><B>UPDATE_RULE</B> short => What happens to foreign key when primary is updated: <UL> <LI> importedNoAction - do not allow update of primary key if it has been imported <LI> importedKeyCascade - change imported key to agree with primary key update <LI> importedKeySetNull - change imported key to NULL
if its primary key has been updated <LI> importedKeySetDefault - change imported key to default values if its primary key has been updated <LI> importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility) </UL> <LI><B>DELETE_RULE</B> short => What happens to the foreign key when primary is deleted. <UL> <LI> importedKeyNoAction - do not allow delete of primary key if it has been imported <LI> importedKeyCascade - delete rows that import a deleted key <LI> importedKeySetNull - change imported key to NULL
if its primary key has been deleted <LI> importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility) <LI> importedKeySetDefault - change imported key to default if its primary key has been deleted </UL> <LI><B>FK_NAME</B> String => foreign key name (may be null
) <LI><B>PK_NAME</B> String => primary key name (may be null
) <LI><B>DEFERRABILITY</B> short => can the evaluation of foreign key constraints be deferred until commit <UL> <LI> importedKeyInitiallyDeferred - see SQL92 for definition <LI> importedKeyInitiallyImmediate - see SQL92 for definition <LI> importedKeyNotDeferrable - see SQL92 for definition </UL> </OL>
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.