-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# DROP | ||
|
||
## DROP TABLE | ||
|
||
`DROP TABLE` removes tables from the database. It will remove the table definition and all table data, indexes, rules, and constraints for that table. | ||
|
||
### Syntax | ||
|
||
```sql | ||
DROP TABLE [ IF EXISTS ] table_name [, ...] | ||
``` | ||
|
||
- `IF EXISTS`: Do not throw an error if the table does not exist. | ||
- `table_name`: The name of the table to remove. | ||
|
||
|
||
### Examples | ||
|
||
To destroy two tables, `monitor` and `system_metrics`: | ||
|
||
```sql | ||
DROP TABLE monitor, system_metrics; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,6 +146,7 @@ | |
- insert | ||
- cast | ||
- copy | ||
- drop | ||
- select | ||
- distinct | ||
- where | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# DROP | ||
|
||
## DROP TABLE | ||
|
||
`DROP TABLE` 从数据库中删除表,它将删除该表的表定义和所有表数据、索引、规则和约束。 | ||
|
||
### 语法 | ||
|
||
```sql | ||
DROP TABLE [ IF EXISTS ] table_name [, ...] | ||
``` | ||
|
||
- `IF EXISTS`: 如果表不存在,则不抛出错误。 | ||
- `table_name`: 要删除的表的名称。 | ||
|
||
### 示例 | ||
|
||
删除表 `monitor` 和 `system_metrics`: | ||
|
||
```sql | ||
DROP TABLE monitor, system_metrics; | ||
``` |