Contents IndexCREATE SCHEMA statement CREATE TABLE statement

User's Guide
   Part VI. SQL Anywhere Reference
     Chapter 43. Watcom-SQL Statements
      CREATE SUBSCRIPTION statement

Function

To create a subscription for a user to a publication.

Syntax

     CREATE SUBSCRIPTION

     TO publication-name [ ( string ) ]

     ... FOR userid

Usage

Anywhere. This statement is applicable only to SQL Remote.

Permissions

Must have DBA authority.

Side effects

Automatic commit.

See also

Description

In a SQL Remote installation, data is organized into publications for replication. In order to receive SQL Remote messages, a subscription must be created for a user ID with REMOTE permissions.

If a string is supplied in the subscription, it is matched against each SUBSCRIBE BY expression in the publication. The subscriber receives all rows for which the value of the expression is equal to the supplied string.

In SQL Remote, publications and subscriptions are two-way relationships. If you create a subscription for a remote user to a publication on a consolidated database, you should also create a subscription for the consolidated database on the remote database. The extraction utility carries this out automatically.

Example

     CREATE SUBSCRIPTION TO pub_sales ( 'Eastern' )
     FOR p_chin

Contents IndexCREATE SCHEMA statement CREATE TABLE statement