sp_remote_primary_keys system procedure

Provides primary key information about remote tables using remote data access.

Syntax
sp_remote_primary_keys(
 @server_name
 [, @table_name
 [, @table_owner
 [, @table_qualifier ] ] ]
)
Arguments
  • @server_name   Use this CHAR(128) parameter to specify the server the remote table is located on.

  • @table_name   Use this optional CHAR(128) parameter to specify the remote table.

  • @table_owner   Use this optional CHAR(128) parameter to specify the owner of the remote table.

  • @table_qualifier   Use this optional CHAR(128) parameter to specify the name of the remote database.

Result set
Column name Data type Description
database CHAR(128) The name of the remote database.
owner CHAR(128) The owner of the remote table.
table-name CHAR(128) The remote table.
column-name CHAR(128) The column name.
key-seq SMALLINT The primary key sequence number.
pk-name CHAR(128) The primary key name.
Remarks

This system procedure provides primary key information about remote tables using remote data access.

Because of differences in the underlying ODBC/JDBC calls, the information returned differs slightly in terms of the catalog/database value depending upon the remote data access class that is specified for the server. However, the important information (for example, column name) is as expected.

Standards and compatibility
  • Sybase   Supported by Open Client/Open Server.

Permissions

None

Side effects

None