sp_remote_columns system procedure

Function

Produces a list of the columns on a remote table and a description of those columns. For each column, the procedure returns its database, owner, table, column, domain ID, width, scale, and nullability.

The server must be defined with the CREATE SERVER statement to use this system procedure.

NoteYou cannot capture output from this procedure in a file. If you use the redirection operator, you receive the message “Cursor is restricted to Fetch Next operations.”

Syntax

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

Permissions

None.

See also

Chapter 17, “Server Classes for Remote Data Access” and Chapter 16, “Accessing Remote Data” in the Sybase IQ System Administration Guide

CREATE SERVER statement

Description

If you are entering a CREATE EXISTING statement and you are specifying a column list, it may be helpful to get a list of the columns that are available on a remote table. sp_remote_columns produces a list of the columns on a remote table and a description of those data types.

Standards and compatibility

Example

To get a list of the columns in the sysobjects table in the production database in an ASE server named asetest:

sp_remote_columns asetest, sysobjects,
null, production