Step 2: Map Remote Table Schema to Adaptive Server

Once you have defined the storage location, you can create the table as a new object or as an existing object. If the table does not exist at the remote storage location, use the create table syntax. If it already exists, use the create existing table syntax. If the object type is rpc, only the create existing table syntax is allowed.

When a create existing table statement is received and the object type is either table or view, the existence of the remote object is checked using the catalog stored procedure sp_tables.

If the object exists, column and index attributes are obtained and compared with those defined for the object in the create existing table command. The server checks the column name, type, length and null property and adds index attributes to the sysindexes system table.

Once the object has been created, either as a new or existing object, users can query the remote object by using the local proxy name.

See create table and create index in the Adaptive Server Reference Manual.