Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
qiancai authored and ti-chi-bot committed Apr 4, 2023
1 parent 3cbd7c1 commit 14afbfb
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions sql-statements/sql-statement-drop-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,14 @@ Query OK, 0 rows affected (0.22 sec)
mysql> DROP TABLE table_not_exists;
ERROR 1051 (42S02): Unknown table 'test.table_not_exists'
mysql> DROP TABLE IF EXISTS table_not_exists;
Query OK, 0 rows affected (0.01 sec)
Query OK, 0 rows affected, 1 warning (0.01 sec)
mysql> SHOW WARNINGS;
+-------+------+---------------------------------------+
| Level | Code | Message |
+-------+------+---------------------------------------+
| Note | 1051 | Unknown table 'test.table_not_exists' |
+-------+------+---------------------------------------+
1 row in set (0.01 sec)

mysql> CREATE VIEW v1 AS SELECT 1;
Query OK, 0 rows affected (0.10 sec)
Expand All @@ -55,8 +62,7 @@ Query OK, 0 rows affected (0.23 sec)

## MySQL compatibility

* Dropping a table with `IF EXISTS` does not return a warning when attempting to drop a table that does not exist. [Issue #7867](https://github.com/pingcap/tidb/issues/7867)
* Currently `RESTRICT` and `CASCADE` are only supported syntactically.
Currently `RESTRICT` and `CASCADE` are only supported syntactically.

## See also

Expand Down

0 comments on commit 14afbfb

Please sign in to comment.