Skip to content

Commit

Permalink
[FLINK-23028][docs] Improve documentation for pages of SQL
Browse files Browse the repository at this point in the history
This closes apache#16070
  • Loading branch information
RocMarshal committed Jun 25, 2021
1 parent e8b7f3d commit b116a4e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
15 changes: 14 additions & 1 deletion docs/content.zh/docs/dev/table/sql/drop.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ under the License.



DROP 语句用于从当前或指定的 [Catalog]({{< ref "docs/dev/table/catalogs" >}}) 中删除一个已经注册的表、视图或函数。
DROP 语句可用于删除指定的 catalog,也可用于从当前或指定的 [Catalog]({{< ref "docs/dev/table/catalogs" >}}) 中删除一个已经注册的表、视图或函数。

Flink SQL 目前支持以下 DROP 语句:

- DROP CATALOG
- DROP TABLE
- DROP DATABASE
- DROP VIEW
Expand Down Expand Up @@ -146,6 +147,18 @@ Flink SQL> SHOW TABLES;
{{< /tab >}}
{{< /tabs >}}

## DROP CATALOG

```sql
DROP CATALOG [IF EXISTS] catalog_name
```

删除给定名字的 catalog。

**IF EXISTS**

如果目标 catalog 不存在,则不会执行任何操作。

## DROP TABLE

```sql
Expand Down
2 changes: 1 addition & 1 deletion docs/content.zh/docs/dev/table/sql/use.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ Flink SQL> SHOW FULL MODULES;

{{< top >}}

## USE CATLOAG
## USE CATALOG

```sql
USE CATALOG catalog_name
Expand Down
15 changes: 14 additions & 1 deletion docs/content/docs/dev/table/sql/drop.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ under the License.

# DROP Statements

DROP statements are used to remove a registered table/view/function from current or specified [Catalog]({{< ref "docs/dev/table/catalogs" >}}).
DROP statements are used to remove a catalog with the given catalog name or to remove a registered table/view/function from the current or specified [Catalog]({{< ref "docs/dev/table/catalogs" >}}).

Flink SQL supports the following DROP statements for now:

- DROP CATALOG
- DROP TABLE
- DROP DATABASE
- DROP VIEW
Expand Down Expand Up @@ -138,6 +139,18 @@ Flink SQL> SHOW TABLES;
{{< /tab >}}
{{< /tabs >}}

## DROP CATALOG

```sql
DROP CATALOG [IF EXISTS] catalog_name
```

Drop a catalog with the given catalog name.

**IF EXISTS**

If the catalog does not exist, nothing happens.

## DROP TABLE

```sql
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/dev/table/sql/use.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ Flink SQL> SHOW FULL MODULES;

{{< top >}}

## USE CATLOAG
## USE CATALOG

```sql
USE CATALOG catalog_name
Expand Down

0 comments on commit b116a4e

Please sign in to comment.