Provides information about tables with foreign keys on a specified primary table.
The server must be defined with the CREATE SERVER statement to use this system procedure.
sp_remote_exported_keys( @server_name , @sp_name [, @sp_owner [, @sp_qualifier ] ] )
@server_name Use this CHAR(128) parameter to specify identifies the server the primary table is located on. A value is required for this parameter.
@sp_name Use this CHAR(128) parameter to specify the table containing the primary key. A value is required for this parameter.
@sp_owner Use this optional CHAR(128) parameter to specify the primary table's owner.
@sp_qualifier Use this optional CHAR(128) parameter to specify the database containing the primary table.
Column name | Data type | Description |
---|---|---|
pk_database | CHAR(128) | The database containing the primary key table. |
pk_owner | CHAR(128) | The owner of the primary key table. |
pk_table | CHAR(128) | The primary key table. |
pk_column | CHAR(128) | The name of the primary key column. |
fk_database | CHAR(128) | The database containing the foreign key table. |
fk_owner | CHAR(128) | The foreign key table's owner. |
fk_table | CHAR(128) | The foreign key table. |
fk_column | CHAR(128) | The name of the foreign key column. |
key_seq | SMALLINT | The key sequence number. |
fk_name | CHAR(128) | The foreign key name. |
pk_name | CHAR(128) | The primary key name. |
This procedure provides information about the remote tables that have a foreign key on a particular primary table. The result set for the sp_remote_exported_keys system procedure includes the database, owner, table, column, and name for both the primary and the foreign key, and the foreign key sequence for the foreign key columns. The result set may vary because of the underlying ODBC and JDBC calls, but information about the table and column for a foreign key is always returned.
None
None
To get information about the remote tables with foreign keys on the SYSOBJECTS table, in the production database, on a server named asetest:
CALL sp_remote_exported_keys( @server_name='asetest', @sp_name='sysobjects', @sp_qualifier='production' ); |
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |