Publish 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.

To publish only some columns in a table (Sybase Central)
  1. Connect to the consolidated database as a user with DBA authority.

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

  3. From the File menu, choose 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, select 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. Select each column you want to publish and click Add. Click Next.

  8. Click Finish.

To 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