To delete a view from the database, use drop view:
drop view [owner.]view_name [, [owner.]view_name]...
As indicated, you can drop more than one view at a time. Only its owner (or the Database Owner) can drop a view.
When you issue drop view, information about the view is deleted from sysprocedures, sysobjects, syscolumns, syscomments, sysprotects, and sysdepends. All privileges on that view are also deleted.
If a view depends on a table or on another view that has been dropped, Adaptive Server returns an error message if anyone tries to use the view. If a new table or view is created to replace the one that has been dropped, and if it has the same name as the dropped table or view, the view again becomes usable, as long as the columns referenced in the view definition exist.
Copyright © 2005. Sybase Inc. All rights reserved. |