Skip to content

Commit

Permalink
tidb: add warning message of drop table (#12845) (#13597)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Apr 4, 2023
1 parent 76690c2 commit ccf3d5e
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions sql-statements/sql-statement-drop-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,20 @@ 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)
```

```sql
SHOW WARNINGS;
```

```
+-------+------+---------------------------------------+
| Level | Code | Message |
+-------+------+---------------------------------------+
| Note | 1051 | Unknown table 'test.table_not_exists' |
+-------+------+---------------------------------------+
1 row in set (0.01 sec)
```

{{< copyable "sql" >}}
Expand All @@ -96,7 +109,6 @@ Query OK, 0 rows affected (0.23 sec)

## MySQL 兼容性

* 在尝试删除不存在的表时,使用 `IF EXISTS` 删除表不会返回警告。[Issue #7867](https://github.com/pingcap/tidb/issues/7867)
* 目前 `RESTRICT``CASCADE` 仅在语法上支持。

## 另请参阅
Expand Down

0 comments on commit ccf3d5e

Please sign in to comment.