See also
Description
Parameters
Example
sp_remote_tables system procedure
Function
Syntax
Permissions
Chapter 14 System Procedures and Functions
"CREATE SERVER statement" on page 464
"Tables are related by foreign keys" on page 100 of the book Getting Started
with ASA
Foreign keys reference a row in a separate table that contains the
corresponding primary key. This procedure allows you to obtain a list of the
remote tables with primary keys that correspond to a particular foreign key
table. The
sp_remote_imported_keys
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 primary key is always returned.
To use the
sp_remote_imported_keys
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 foreign key table is located on. A
value is required for this parameter.
@sp_name
identifies the table containing the foreign key. A value is
required for this parameter.
@sp_owner
identifies the foreign key table's owner. This parameter is
optional.
@sp_qualifier
identifies the database containing the foreign key table.
This parameter is optional.
♦
To get information about the tables with primary keys that correspond to
a foreign key on the
server:
call sp_remote_imported_keys (@server_name='asetest',
@sp_name='sysobjects', @sp_qualifier='production')
Returns a list of the tables on a server.
The server must be defined with the CREATE SERVER statement to use this
system procedure.
sp_remote_tables server_name [, table_name ] [, table_owner ]
[, table_qualifier ] [, with_table_type ]
None
result set includes the database, owner,
stored procedure, your database must
table, owned by fred, in the
sysobjects
asetest
977
Need help?
Do you have a question about the Adaptive Server Anywhere and is the answer not in the manual?
Questions and answers