Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Usage » Accessing Remote Data » Working with proxy tables

Creating proxy tables (Sybase Central) Next Page

Creating proxy tables with the CREATE EXISTING TABLE statement


The CREATE EXISTING TABLE statement creates a proxy table that maps to an existing table on the remote server. SQL Anywhere derives the column attributes and index information from the object at the remote location.

To create a proxy table with the CREATE EXISTING TABLE statement (SQL)
  1. Connect to the host database.

  2. Execute a CREATE EXISTING TABLE statement.

  3. For more information, see CREATE EXISTING TABLE statement.

    Example 1

    To create a proxy table called p_Employees on the current server to a remote table named Employees on the server named RemoteSA, use the following syntax:

    CREATE EXISTING TABLE p_Employees
    AT 'RemoteSA..GROUPO.Employees';
    A proxy table called p_Employees is on the local server, and is mapped to the Employees table on the RemoteSA server.
    Example 2

    The following statement maps the proxy table a1 to the Microsoft Access file mydbfile.mdb. In this example, the AT keyword uses the semicolon (;) as a delimiter. The server defined for Microsoft Access is named access.

    CREATE EXISTING TABLE a1
    AT 'access;d:\mydbfile.mdb;;a1';