The following statement creates a publication that publishes the whole customer table:

CREATE PUBLICATION pub_customer ( TABLE customer

)

The following statement creates a publication including all columns and rows in each of a set of tables from the Adaptive Server Anywhere sample database:

CREATE PUBLICATION sales ( TABLE customer,

TABLE sales_order, TABLE sales_order_items, TABLE product

)

For more information, see the “CREATE PUBLICATION statement”

[ASA SQL Reference, page 385].

Publishing only some columns in a table

You can create a publication that contains all the rows, but only some of the columns, of a table from Sybase Central or by listing the columns in the CREATE PUBLICATION statement.

To publish only some columns in a table (Sybase Central)

1.Connect to the database as a user with DBA authority.

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

3.From the File menu, choose New Publication. The Publication Creation wizard appears.

4.Type a name for the new publication. Click Next.

5.On the Tables tab, select a table from the list of Available tables. Click Add. The table is added to the list of Selected Tables on the right.

6.On the 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. The selected columns appear on the right in the Selected Columns list.

7.Click Finish.

94

Page 112
Image 112
Sybase DC38133-01-0902-01 Publishing only some columns in a table, To publish only some columns in a table Sybase Central