Rechercher dans le manuel MySQL
13.1.35 DROP VIEW Syntax
DROP VIEW
removes one or more
views. You must have the DROP
privilege for each view.
If any views named in the argument list do not exist, the statement fails with an error indicating by name which nonexisting views it was unable to drop, and no changes are made.
In MySQL 5.7 and earlier,
DROP VIEW
returns an error if any
views named in the argument list do not exist, but also drops
all views in the list that do exist. Due to the change in
behavior in MySQL 8.0, a partially completed
DROP VIEW
operation on a MySQL
5.7 master fails when replicated on a MySQL
8.0 slave. To avoid this failure scenario, use
IF EXISTS
syntax in DROP
VIEW
statements to prevent an error from occurring for
views that do not exist. For more information, see
Section 13.1.1, “Atomic Data Definition Statement Support”.
The IF EXISTS
clause prevents an error from
occurring for views that don't exist. When this clause is given, a
NOTE
is generated for each nonexistent view.
See Section 13.7.6.40, “SHOW WARNINGS Syntax”.
RESTRICT
and CASCADE
, if
given, are parsed and ignored.
Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-drop-view.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.