Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
提供其外键属于指定主表的表信息。
要使用此系统过程,必须用 CREATE SERVER 语句对服务器进行定义。
sp_remote_exported_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) 参数指定包含主表的数据库。缺省值为 '%'。
此过程提供外键属于特定主表的远程表的信息。sp_remote_exported_keys 系统过程的结果集包含数据库、所有者、表、列、主键和外键的名称以及外键列的外键序列。由于基础 ODBC 和 JDBC 调用的缘故,结果集可能不同,但总是返回外键的表信息和列信息。
无
本示例返回远程服务器 RemoteSA 上 ULEmployee 表中外键关系的相关信息:
CALL sp_remote_exported_keys( 'RemoteSA', 'ULEmployee', 'DBA' );