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

SQL Anywhere 12.0.1 » SQL Anywhere Server - SQL Usage » Tables, views, and indexes » Views » Regular views


Alter a regular view (Sybase Central)

You edit a regular view by editing its definition in the database. For example, if you want the view to contain data from an additional table, you would update the view definition to join the table data with the existing data sources in the view definition.


You must be a user with DBA authority or be the owner of the regular view.

Context and remarks

A view definition is out of date (won't compile because of a schema change in the underlying data), needs columns added or removed, or requires changes related to its settings.

You cannot rename an existing view. Instead, you must create a new view with the new name, copy the previous definition to it, and then drop the old view.

 Alter a regular view using Sybase Central
  1. Use the SQL Anywhere 12 plug-in to connect to the database.

  2. In the left pane, double-click Views.

  3. Select the view.

  4. In the right pane, click the SQL tab and edit the view's definition.


    If you want to edit multiple views, you can open separate windows for each view rather than editing each view on the SQL tab in the right pane. You can open a separate window by selecting a view and then clicking File » Edit In New Window.

  5. Click File » Save.


The definition of the view is updated in the database.


Query the view to examine the results and ensure the correct data is returned.

If you alter a regular view and there are other views dependent on the view, there may be additional steps to make after the alteration is complete. For example, after you alter a view, the database server automatically recompiles it, enabling it for use by the database server. If there are dependent regular views, the database server disables and re-enables them as well. If they cannot be enabled, they are given the status INVALID and you must either make the definition of the regular view consistent with the definitions of the dependent regular views, or vice versa. To determine whether a regular view has dependent views, use the sa_dependent_views system procedure.

 See also