DROP VIEW [IF EXISTS] view_name [, view_name] ... [RESTRICT | CASCADE]
If any views named in the argument list do not exist, the statement returns an error indicating by name which nonexisting views it was unable to drop, but also drops all views in the list that do exist.
In MySQL 8.0,
fails if any views named in the argument list do not exist. Due
to the change in behavior, a partially completed
DROP VIEW operation on a MySQL
5.7 master fails when replicated to a MySQL
8.0 slave. To avoid this failure scenario, use
IF EXISTS syntax in
VIEW statements to prevent an error from occurring for
views that do not exist. For more information, see
Atomic Data Definition Statement Support.
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 184.108.40.206, “SHOW WARNINGS Statement”.
given, are parsed and ignored.