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

SQL Anywhere 11.0.1 (日本語) » 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 システム・プロシージャを参照してください。