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

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - SQL Usage » Tables, views, and indexes » Tables » Table alteration


Altering a table

You can use Sybase Central to alter tables in your database, for example to add or remove columns, or change the table owner.


You must be the owner, or have one of the following privileges:

  • ALTER privilege on the table and one of COMMENT ANY OBJECT, CREATE ANY OBJECT, or CREATE ANY TABLE system privileges.
  • ALTER ANY TABLE system privilege
  • ALTER ANY OBJECT system privilege
  • ALTER ANY OBJECT OWNER privilege (if changing the table owner) and one of ALTER ANY OBJECT system privilege, ALTER ANY TABLE system privilege, or ALTER privilege on the table.

Altering tables fails if there are any dependent materialized views; you must first disable dependent materialized views. Use the sa_dependent_views system procedure to determine if there are dependent materialized views.

  1. In Sybase Central, use the SQL Anywhere 16 plug-in to connect to the database.

  2. Choose one of the following options:

    Option Action
    Change the columns
    1. Double-click the table you want to alter.

    2. In the right pane click the Columns tab and alter the columns for the table as desired.

    3. Click File » Save.

    Change the owner of the table
    • Right-click a table, click Properties » Change Owner Now, and change the table owner.


The table definition is updated in the database.


If you disabled materialized views to alter the table, you must re-enable and initialize each one.

 See also