Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
使用远程数据访问提供远程表的主键信息。
sp_remote_primary_keys( @server_name , @table_name [, @table_owner [, @table_qualifier ] ] )
@server_name 使用此 CHAR(128) 参数指定远程服务器名。
@table_name 使用此 CHAR(128) 参数指定远程表的名称。
@table_owner 使用此可选的 CHAR(128) 参数指定远程表的所有者。缺省值为 '%'。
@table_qualifier 使用此可选的 CHAR(128) 参数指定远程数据库的名称。缺省值为 '%'。
此系统过程使用远程数据访问提供远程表的主键信息。
由于基础 ODBC 调用的差异,返回的信息在目录/数据库值方面会稍有不同(这取决于为服务器所指定的远程数据访问类)。
无
Sybase 受 Open Client/Open Server 支持。
以下示例返回 SQL Anywhere 远程服务器 RemoteSA 中由 DBA 所有的表中主键的相关信息。
CALL sp_remote_primary_keys( 'RemoteSA', null, 'DBA' );
获取 production 数据库(在名为 RemoteASE 的 Adaptive Server Enterprise 服务器中)中由 Fred 拥有的所有表中主键的列表:
CALL sp_remote_primary_keys( 'RemoteASE', null, 'Fred', 'production' );