Sams Teach Yourself SQL in 24 Hours

Sams Teach Yourself SQL in 24 Hours

By Ron Plew and Ryan Stephens

Dropping a View

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:

   mysql_icon.gif
   input_icon.gif

   DROP VIEW NAMES2;

   output_icon.gif
View dropped.

Share ThisShare This

Informit Network