You can alter tables in Sybase Central on the Columns tab in the right pane. For example, you can add or drop columns, change column definitions, or change table or column properties. Altering tables fails if there are any dependent materialized views; you must first disable dependent materialized views. Once your table alterations are complete, you must re-enable the dependent materialized views. See View dependencies.
Use the sa_dependent_views system procedure to determine if there are dependent materialized views. See sa_dependent_views system procedure.
Connect to the database as a user with DBA authority, or as owner of the table.
If you are making a schema change and there are materialized views dependent on the table, disable each one as follows:
In the left pane, double-click Views.
Right-click the materialized view and choose Disable.
Double-click Tables and select the table you want to alter.
In the right pane, click the Columns tab and alter the table settings.
Choose File » Save.
If you disabled materialized views, re-enable and initialize each one. See Enable and disable materialized views.
You can add columns by selecting a table's Columns tab and choosing File » New Column.
You can drop columns by selecting the column on the Columns tab and choosing Edit » Delete.
You can copy a column to a table by selecting the column on the Columns tab in the right pane and then clicking Copy. Select the table, click the Columns tab in the right pane, and then click Paste.
It is also necessary to click Save or choose File » Save. Changes are not made to the table until then.
|Envoyer votre avis sur cette page par email.||Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|