Skip to content

Commit

Permalink
add warning message of drop table
Browse files Browse the repository at this point in the history
  • Loading branch information
glorv committed Jan 31, 2023
1 parent cbd72a8 commit 5692376
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions sql-statements/sql-statement-drop-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,22 @@ 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)
```

{{< copyable "sql" >}}

```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 @@ -97,7 +112,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 5692376

Please sign in to comment.