You can control whether a regular view is available for use by the database server by enabling or disabling it.
Prerequisites
You must be the owner, or have one of the following privileges:
To enable a regular view, you must also have the following privileges SELECT privilege on the underlying table(s), or the SELECT ANY TABLE system privilege.
Before you enable a regular view, you must re-enable any disabled views that it references.
Context and remarks
If you disable a view, other views that reference it, directly or indirectly, are automatically disabled. So, once you re-enable a view, you must re-enable all other views that were dependent on the view when it was disabled. You can determine the list of dependent views before disabling a view using the sa_dependent_views system procedure.
Connect to the database.
To disable a regular view, execute an ALTER VIEW...DISABLE statement.
To enable a regular view, execute an ALTER VIEW...ENABLE statement.
Example
The following example disables a regular view called ViewSalesOrders owned by GROUPO.
ALTER VIEW GROUPO.ViewSalesOrders DISABLE; |
The following example re-enables the regular view called ViewSalesOrders owned by GROUPO.
ALTER VIEW GROUPO.ViewSalesOrders ENABLE; |
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0 |