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

SQL Anywhere 12.0.0 (Français) » MobiLink - Getting Started » MobiLink Tutorials » Tutorial: Changing a schema using the script version clause


Lesson 6: Perform a schema change on the remote database

In this lesson, you modify the remote database to add the new column to the customer table and to change the script version used to synchronize.

 ♦  To perform a schema change on the remote database
  1. First, you start a synchronization schema change. This is required for most schema changes that affect synchronizing tables. This statement changes the script version that is used to synchronize the subscription, and locks the affected table so the schema change can proceed safely.

    Execute the following SQL on the remote database using the instance of Interactive SQL that's connected to the remote database:

    FOR TABLES customer
    SET SCRIPT VERSION = 'my_ver2';
  2. Next, add the new column to the customer table with the following SQL:

    ALTER TABLE customer ADD cell_phone varchar(12) default null;
  3. Lasting, close the schema change which unlocks the tables.