System and catalog stored procedures
976
"CREATE SERVER statement" on page 464
"Tables are related by foreign keys" on page 100 of the book Getting Started
with ASA
This procedure provides information about the remote table that has a foreign
key on a particular primary key table. The
sp_remote_exported_keys
stored
procedure’s result set includes the database, owner, table, column, and name
for the both the primary and the foreign key, as well as the foreign key
sequence for the foreign key column. 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.
To use the
sp_remote_exported_keys
stored procedure, your database must
be created or upgraded using version 7.0.2 or higher of Adaptive Server
Anywhere.
The procedure accepts four arguments:
@server_name identifies the server the primary key table is located on. A
value is required for this parameter.
@sp_name identifies the table containing the primary key. A value is
required for this parameter.
@sp_owner identifies the primary key table’s owner. This parameter is
optional.
@sp_qualifier identifies the database containing the primary key table.
This parameter is optional.
♦ To get information about the remote tables with foreign keys on the
sysobjects
table, in the
production
database, in a server named
asetest
:
call sp_remote_exported_keys (@server_name=’asetest’,
@sp_name=’sysobjects’, @sp_qualifier=’production’)
sp_remote_imported_keys system procedure
Provides information about remote tables with primary keys that correspond
to a specified foreign key.
The server must be defined with the CREATE SERVER statement to use this
system procedure.
sp_remote_imported_keys
@server_name, @sp_name
[,
@sp_owner
]
[,
@sp_qualifier
]
None
None
See also
Description
Parameters
Example
Function
Syntax
Permissions
Side effects