Listing the columns on a remote table

If you are entering a CREATE EXISTING TABLE 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. The sp_remote_columns system procedure produces a list of the columns on a remote table and a description of those data types.

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

If a tablename, owner, or database name is given, the list of columns is limited to only those that match.

For example, to get a list of the columns in the sysobjects table in the production database in an Adaptive Server Enterprise server named asetest:

sp_remote_columns  asetest, sysobjects, null, production

For more information, see the sp_remote_columns system procedure in the Sybase IQ Reference Manual.