-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add drop table to reference #974
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2f9780d
docs: add drop table to reference
nicecui ab1782b
add drop database
nicecui 85e3160
use case
nicecui f60d423
faq
nicecui 01b7652
apply review suggestions
nicecui cac20e1
typo
nicecui 4bc5ab0
remove force
nicecui File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ZH's summary.yml should be updated also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Only the directory name needs to be updated in the zh summary.yml.