CHAPTER 3 Working with Database Objects
131
• The user was granted appropriate permission(s) for the operation on the
view by a non-DBA user. This user must be either the owner of the view
or have WITH GRANT OPTION of the appropriate permission(s) on the
view. The owner of the view must be either:
• a DBA, or
• a non-DBA, but also the owner of all the base table(s) referred to by
the view, or
• a non-DBA, and not the owner of some or all of the base table(s)
referred to by the view, but the view owner has SELECT permission
WITH GRANT OPTION on the base table(s) not owned and any
other required permission(s) WITH GRANT OPTION on the base
table(s) not owned for the operation.
Instead of the owner having permission(s) WITH GRANT OPTION
on the base table(s), permission(s) may have been granted to
PUBLIC. This includes SELECT permission on system tables.
UPDATE permissions can be granted only on an entire view. Unlike tables,
UPDATE permissions cannot be granted on individual columns within a view.
Deleting views
To delete a view from the database, you use the DROP statement. The
following statement removes the DepartmentSize view:
DROP VIEW DepartmentSize
Dropping a view in
Sybase Central
To drop a view in Sybase Central, right-click the view you wish to delete and
select Delete from the pop-up menu.
For more information, see the Sybase Central online Help.
Views in the system tables
All the information about views in a database is held in the system table
SYS.SYSTABLE. The information is presented in a more readable format in
the system view SYS.SYSVIEWS. For more information about these, see
Adaptive Server IQ Reference Manual.