Produces a list of the columns in a remote table, and a description of their data types.
The server must be defined with the CREATE SERVER statement to use this system procedure.
Syntaxsp_remote_columns( @server_name, @table_name [, @table_owner [, @table_qualifier] ] )
Arguments@server_name Use this CHAR(128) parameter to specify a string containing the server name as specified by the CREATE SERVER statement.
@table_name Use this CHAR(128) parameter to specify the name of the remote table.
@table_owner Use this optional CHAR(128) parameter to specify the owner of @table_name.
@table_qualifier Use this optional CHAR(128) parameter to specify the name of the database in which @table_name is located.
Result set| Column name | Data type | Description |
|---|---|---|
| database | CHAR(128) | The database name. |
| owner | CHAR(128) | The database owner name. |
| table-name | CHAR(128) | The table name. |
| column-name | CHAR(128) | The name of a column. |
| domain-id | SMALLINT | An INTEGER which indicates the data type of the column. |
| width | SMALLINT | The meaning of this column depends on the data type. For character types width represents the number of characters. |
| scale | SMALLINT | The meaning of this column depends on the data type. For NUMERIC data types scale is the number of digits after the decimal point. |
| nullable | SMALLINT | If null column values are allowed, the value is 1. Otherwise the value is 0. |
RemarksIf 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 their data types. If you specify a database, you must either specify an owner or provide the value NULL.
Standards and compatibilitySybase Supported by Open Client/Open Server.
PermissionsNone
Side effectsNone
See also
Example![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |
