Dropping a View

Team-Fly    

 
Sams Teach Yourself SQL in 24 Hours, Third Edition
By Ronald R. Plew, Ryan K. Stephens
Table of Contents
Hour 20.  Creating and Using Views and Synonyms


The DROP VIEW command is used to drop a view from the database. There are two options to the DROP VIEW command: RESTRICT and CASCADE. If a view is dropped with the RESTRICT option, when any other views are referenced in a constraint, the DROP VIEW errs. If the CASCADE option is used and another view or constraint is referenced, the DROP VIEW succeeds and the underlying view or constraint is also dropped. An example follows :

 graphics/mysql_icon.gif graphics/input_icon.gif  DROP VIEW NAMES2;  graphics/output_icon.gif View dropped. 
graphics/cautions_icon.gif

Take care when using the CASCADE option so that important views are not inadvertently removed from the database.



Team-Fly    
Top
 


Sams Teach Yourself SQL in 24 Hours
Sams Teach Yourself SQL in 24 Hours (5th Edition) (Sams Teach Yourself -- Hours)
ISBN: 0672335417
EAN: 2147483647
Year: 2002
Pages: 275

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net