Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » System Procedures » System procedures

sp_remote_columns system procedure Next Page

sp_remote_exported_keys system procedure

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_name
[, @sp_owner
[, @sp_qualifier ] ]

Result set
Column nameData type Description
pk_databaseCHAR(128)The database containing the primary key table.
pk_ownerCHAR(128)The owner of the primary key table.
pk_tableCHAR(128)The primary key table.
pk_columnCHAR(128)The name of the primary key column.
fk_databaseCHAR(128)The database containing the foreign key table.
fk_ownerCHAR(128)The foreign key table's owner.
fk_tableCHAR(128)The foreign key table.
fk_columnCHAR(128)The name of the foreign key column.
key_seqSMALLINTThe key sequence number.
fk_nameCHAR(128)The foreign key name.
pk_nameCHAR(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, as well as 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.



Side effects


See also

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(
     @sp_qualifier='production' )