Skip to content

Commit

Permalink
docs: add drop table to reference
Browse files Browse the repository at this point in the history
  • Loading branch information
nicecui committed May 22, 2024
1 parent c591745 commit 2f9780d
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/nightly/en/reference/sql/drop.md
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;
```
1 change: 1 addition & 0 deletions docs/nightly/en/summary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
- insert
- cast
- copy
- drop
- select
- distinct
- where
Expand Down
22 changes: 22 additions & 0 deletions docs/nightly/zh/reference/sql/drop.md
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;
```

0 comments on commit 2f9780d

Please sign in to comment.