Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.0 (中文) » SQL Anywhere 服务器 - SQL 的用法 » 远程数据和批量操作 » 访问远程数据 » 使用代理表

 

列出远程表上的列

在执行 CREATE EXISTING TABLE 语句之前,获得远程表上可用列的列表可能很有帮助。sp_remote_columns 系统过程生成远程表上列的列表和这些数据类型的说明。以下是 sp_remote_columns 系统过程的语法:

sp_remote_columns servername, tablename [, owner ]
[, database]

如果给定了表名、所有者或数据库名,则列的列表仅限于那些符合条件的列。

例如,以下语句返回名为 asetest 的 Adaptive Server Enterprise 服务器上 production 数据库中 sysobjects 表中列的列表:

CALL sp_remote_columns  asetest, sysobjects, null, production;

有关详细信息,请参见sp_remote_columns 系统过程