-
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
20 changed files
with
179 additions
and
21 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
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
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
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,57 @@ | ||
# DROP | ||
|
||
## DROP DATABASE | ||
|
||
`DROP DATABASE` drops a database. It removes the catalog entries for the database and deletes the directory containing the data. | ||
|
||
:::danger Danger | ||
|
||
`DROP DATABASE` cannot be undone. Use it with care! | ||
|
||
::: | ||
|
||
### Syntax | ||
|
||
```sql | ||
DROP DATABASE [ IF EXISTS ] db_name | ||
``` | ||
|
||
- `IF EXISTS`: Do not throw an error if the database does not exist. | ||
- `db_name`: The name of the database to remove. | ||
|
||
### Examples | ||
|
||
To drop a database named `test`: | ||
|
||
```sql | ||
DROP DATABASE test; | ||
``` | ||
|
||
|
||
## 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. | ||
|
||
:::danger Danger | ||
|
||
`DROP TABLE` cannot be undone. Use it with care! | ||
|
||
::: | ||
|
||
### 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 | ||
|
||
Drop the table `monitor` in the current database: | ||
|
||
```sql | ||
DROP TABLE monitor; | ||
``` |
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# 概览 | ||
# 概述 | ||
|
||
- [GreptimeDB 单机模式](greptimedb-standalone.md) | ||
- [GreptimeDB 分布式集群](greptimedb-cluster.md) |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# 概览 | ||
# 概述 | ||
|
||
立即开始使用 GreptimeDB! | ||
|
||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# 概览 | ||
# 概述 | ||
|
||
使用你熟悉的协议或语言快速上手 GreptimeDB! | ||
在这些文档中,我们将以 CPU 使用率为例,快速地感受 GreptimeDB 的基本用法。 | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# 概览 | ||
# 概述 | ||
|
||
此文档将帮助你了解 GreptimeCloud 的用量和费用。 | ||
|
||
|
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,55 @@ | ||
# DROP | ||
|
||
## DROP DATABASE | ||
|
||
`DROP DATABASE` 用于删除数据库,它删除数据库的目录项并删除包含数据的目录。 | ||
|
||
:::danger 危险操作 | ||
|
||
`DROP DATABASE` 无法撤消。请谨慎使用! | ||
|
||
::: | ||
|
||
### 语法 | ||
|
||
```sql | ||
DROP DATABASE [ IF EXISTS ] db_name | ||
``` | ||
|
||
- `IF EXISTS`: 如果数据库不存在,则不抛出错误。 | ||
- `db_name`: 要删除的数据库的名称。 | ||
|
||
### 示例 | ||
|
||
删除名为 `test` 的数据库: | ||
|
||
```sql | ||
DROP DATABASE test; | ||
``` | ||
|
||
## DROP TABLE | ||
|
||
`DROP TABLE` 从数据库中删除表,它将删除该表的表定义和所有表数据、索引、规则和约束。 | ||
|
||
:::danger 危险操作 | ||
|
||
`DROP TABLE` 无法撤消。请谨慎使用! | ||
|
||
::: | ||
|
||
### 语法 | ||
|
||
```sql | ||
DROP TABLE [ IF EXISTS ] table_name | ||
``` | ||
|
||
- `IF EXISTS`: 如果表不存在,则不抛出错误。 | ||
- `table_name`: 要删除的表的名称。 | ||
|
||
### 示例 | ||
|
||
删除 `monitor` 表: | ||
|
||
```sql | ||
DROP TABLE monitor; | ||
``` |
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
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
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
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