Contents Index Creating proxy tables with the CREATE EXISTING TABLE statement Listing the columns on a remote table

ASA SQL User's Guide
  Accessing Remote Data
    Working with proxy tables

Creating a proxy table with the CREATE TABLE statement


The CREATE TABLE statement creates a new table on the remote server, and defines the proxy table for that table when you use the AT option. You enter the CREATE TABLE statement using Adaptive Server Anywhere data types. Adaptive Server Anywhere automatically converts the data into the remote server's native types.

If you use the CREATE TABLE statement to create both a local and remote table, and then subsequently use the DROP TABLE statement to drop the proxy table, then the remote table also gets dropped. You can, however, use the DROP TABLE statement to drop a proxy table created using the CREATE EXISTING TABLE statement if you do not want to drop the remote table.

For more information, see the CREATE TABLE statement.

To create a proxy table with the CREATE EXISTING TABLE statement (SQL)

  1. Connect to the host database.

  2. Execute a CREATE TABLE statement.

For more information, see the CREATE TABLE statement.

Example 

The following statement creates a table named employee on the remote server asademo1, and creates a proxy table named members that maps to the remote location:

CREATE TABLE members
( membership_id INTEGER NOT NULL,
member_name CHAR(30) NOT NULL,
office_held CHAR( 20 ) NULL)
AT 'asademo1..DBA.employee'

Contents Index Creating proxy tables with the CREATE EXISTING TABLE statement Listing the columns on a remote table