Publishing only some columns in a table

Use the following procedures to create a publication that contains all the rows, but only some of the columns, of a table.

 Publish only some columns in a table (Sybase Central)
  1. Use the SQL Anywhere 12 plug-in to connect to the consolidated database as a user with DBA authority.

  2. In the left pane, expand the Publications folder.

  3. Click File » New » Publication.

  4. In the What Do You Want To Name The New Publication field, type a name for the publication. Click Next.

  5. Click Next.

  6. On the Available Tables list, click a table. Click Add. Click Next.

  7. On the Available Columns tab, double-click the table's icon to expand the list of Available Columns. Click each column you want to publish and click Add. Click Next.

  8. Click Finish.

 Publish only some columns in a table (SQL)
  1. Connect to the consolidated database as a user with DBA authority.

  2. Execute a CREATE PUBLICATION statement that specifies the publication name and the table name. List the published columns in parentheses following the table name.

    For example, the following statement creates a publication that publishes all the rows of the ID, CompanyName, and City columns of the Customers table. This publication does not publish the Surname, GivenName, Street, State, Country, PostalCode, and Phone columns of the Customers table.

    CREATE PUBLICATION PubCustomers (
       TABLE Customers (
          ID,
          CompanyName,
          City )
    );
 See also