This is an automated email from the ASF dual-hosted git repository. morrysnow pushed a commit to branch update_cte in repository https://gitbox.apache.org/repos/asf/doris-website.git
commit ede6b28c4d3fb8e7d60e44ca173088e2b7715d5a Author: morrySnow <[email protected]> AuthorDate: Thu Nov 21 21:06:17 2024 +0800 [opt](cte) indicate not support recursive cte --- docs/query-data/cte.md | 15 +++++++++++---- .../current/query-data/cte.md | 16 ++++++++++------ .../version-2.0/query/query-data/cte.md | 18 +++++++++++------- .../version-2.1/query-data/cte.md | 16 ++++++++++------ .../version-3.0/query-data/cte.md | 16 ++++++++++------ versioned_docs/version-2.0/query/query-data/cte.md | 15 +++++++++++---- versioned_docs/version-2.1/query-data/cte.md | 15 +++++++++++---- versioned_docs/version-3.0/query-data/cte.md | 15 +++++++++++---- 8 files changed, 85 insertions(+), 41 deletions(-) diff --git a/docs/query-data/cte.md b/docs/query-data/cte.md index aeeea6c802c..941d74639a1 100644 --- a/docs/query-data/cte.md +++ b/docs/query-data/cte.md @@ -24,9 +24,19 @@ specific language governing permissions and limitations under the License. --> +## Description + Common Table Expression (CTE) define a temporary result set that can be referenced multiple times within the scope of an SQL statement. CTE are primarily used in SELECT statements. -To specify a CTE, use the WITH clause with one or more comma-separated clauses. Each clause provides a subquery that generates a result set and associates a name with the subquery. The following example defines CTE named cte1 and cte2 within the WITH clause and refers to them in the top-level SELECT below the WITH clause: +To specify a CTE, use the `WITH` clause with one or more comma-separated clauses. Each clause provides a subquery that generates a result set and associates a name with the subquery. + +Within the statement that contains the `WITH` clause, you can reference each CTE name to access the corresponding CTE result set. CTE names can be referenced in other CTE, allowing you to define CTE based on other CTE. + +Doris **DO NOT** support recursive CTE. + +## Example + +The following example defines CTE named cte1 and cte2 within the WITH clause and refers to them in the top-level SELECT below the WITH clause: ```sql WITH @@ -35,6 +45,3 @@ WITH SELECT b, d FROM cte1 JOIN cte2 WHERE cte1.a = cte2.c; ``` - -Within the statement that contains the WITH clause, you can reference each CTE name to access the corresponding CTE result set. CTE names can be referenced in other CTE, allowing you to define CTE based on other CTE. - diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/query-data/cte.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/query-data/cte.md index 4deaa3e9294..e78a1c09a5c 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/query-data/cte.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/query-data/cte.md @@ -24,10 +24,19 @@ specific language governing permissions and limitations under the License. --> +## 描述 公用表表达式(Common Table Expression)定义一个临时结果集,你可以在 SQL 语句的范围内多次引用。CTE 主要用于 SELECT 语句中。 -要指定公用表表达式,请使用 `WITH` 具有一个或多个逗号分隔子句的子句。每个子条款都提供一个子查询,用于生成结果集,并将名称与子查询相关联。下面的示例定义名为的 CTE `cte1` 和 `cte2` 中 `WITH` 子句,并且是指在它们的顶层 `SELECT` 下面的 `WITH` 子句: +要指定公用表表达式,请使用 `WITH` 具有一个或多个逗号分隔子句的子句。每个子条款都提供一个子查询,用于生成结果集,并将名称与子查询相关联。 + +在包含该 `WITH`子句 的语句中,可以引用每个 CTE 名称以访问相应的 CTE 结果集。CTE 名称可以在其他 CTE 中引用,从而可以基于其他 CTE 定义 CTE。 + +Doris **不支持** 递归 CTE。 + +## 示例 + +下面的示例定义名为的 CTE `cte1` 和 `cte2` 中 `WITH` 子句,并且是指在它们的顶层 `SELECT` 下面的 `WITH` 子句: ```sql WITH @@ -36,8 +45,3 @@ WITH SELECT b,d FROM cte1 JOIN cte2 WHERE cte1.a = cte2.c; ``` - -在包含该 `WITH`子句 的语句中,可以引用每个 CTE 名称以访问相应的 CTE 结果集。 - -CTE 名称可以在其他 CTE 中引用,从而可以基于其他 CTE 定义 CTE。 - diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/query/query-data/cte.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/query/query-data/cte.md index fe6807e0116..e78a1c09a5c 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/query/query-data/cte.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/query/query-data/cte.md @@ -24,10 +24,19 @@ specific language governing permissions and limitations under the License. --> +## 描述 -公用表表达式(Common Table Expression)定义一个临时结果集,您可以在 SQL 语句的范围内多次引用。CTE 主要用于 SELECT 语句中。 +公用表表达式(Common Table Expression)定义一个临时结果集,你可以在 SQL 语句的范围内多次引用。CTE 主要用于 SELECT 语句中。 -要指定公用表表达式,请使用 `WITH` 具有一个或多个逗号分隔子句的子句。每个子条款都提供一个子查询,用于生成结果集,并将名称与子查询相关联。下面的示例定义名为的 CTE `cte1` 和 `cte2` 中 `WITH` 子句,并且是指在它们的顶层 `SELECT` 下面的 `WITH` 子句: +要指定公用表表达式,请使用 `WITH` 具有一个或多个逗号分隔子句的子句。每个子条款都提供一个子查询,用于生成结果集,并将名称与子查询相关联。 + +在包含该 `WITH`子句 的语句中,可以引用每个 CTE 名称以访问相应的 CTE 结果集。CTE 名称可以在其他 CTE 中引用,从而可以基于其他 CTE 定义 CTE。 + +Doris **不支持** 递归 CTE。 + +## 示例 + +下面的示例定义名为的 CTE `cte1` 和 `cte2` 中 `WITH` 子句,并且是指在它们的顶层 `SELECT` 下面的 `WITH` 子句: ```sql WITH @@ -36,8 +45,3 @@ WITH SELECT b,d FROM cte1 JOIN cte2 WHERE cte1.a = cte2.c; ``` - -在包含该 `WITH`子句 的语句中,可以引用每个 CTE 名称以访问相应的 CTE 结果集。 - -CTE 名称可以在其他 CTE 中引用,从而可以基于其他 CTE 定义 CTE。 - diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query-data/cte.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query-data/cte.md index 4deaa3e9294..e78a1c09a5c 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query-data/cte.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query-data/cte.md @@ -24,10 +24,19 @@ specific language governing permissions and limitations under the License. --> +## 描述 公用表表达式(Common Table Expression)定义一个临时结果集,你可以在 SQL 语句的范围内多次引用。CTE 主要用于 SELECT 语句中。 -要指定公用表表达式,请使用 `WITH` 具有一个或多个逗号分隔子句的子句。每个子条款都提供一个子查询,用于生成结果集,并将名称与子查询相关联。下面的示例定义名为的 CTE `cte1` 和 `cte2` 中 `WITH` 子句,并且是指在它们的顶层 `SELECT` 下面的 `WITH` 子句: +要指定公用表表达式,请使用 `WITH` 具有一个或多个逗号分隔子句的子句。每个子条款都提供一个子查询,用于生成结果集,并将名称与子查询相关联。 + +在包含该 `WITH`子句 的语句中,可以引用每个 CTE 名称以访问相应的 CTE 结果集。CTE 名称可以在其他 CTE 中引用,从而可以基于其他 CTE 定义 CTE。 + +Doris **不支持** 递归 CTE。 + +## 示例 + +下面的示例定义名为的 CTE `cte1` 和 `cte2` 中 `WITH` 子句,并且是指在它们的顶层 `SELECT` 下面的 `WITH` 子句: ```sql WITH @@ -36,8 +45,3 @@ WITH SELECT b,d FROM cte1 JOIN cte2 WHERE cte1.a = cte2.c; ``` - -在包含该 `WITH`子句 的语句中,可以引用每个 CTE 名称以访问相应的 CTE 结果集。 - -CTE 名称可以在其他 CTE 中引用,从而可以基于其他 CTE 定义 CTE。 - diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/query-data/cte.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/query-data/cte.md index 4deaa3e9294..e78a1c09a5c 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/query-data/cte.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/query-data/cte.md @@ -24,10 +24,19 @@ specific language governing permissions and limitations under the License. --> +## 描述 公用表表达式(Common Table Expression)定义一个临时结果集,你可以在 SQL 语句的范围内多次引用。CTE 主要用于 SELECT 语句中。 -要指定公用表表达式,请使用 `WITH` 具有一个或多个逗号分隔子句的子句。每个子条款都提供一个子查询,用于生成结果集,并将名称与子查询相关联。下面的示例定义名为的 CTE `cte1` 和 `cte2` 中 `WITH` 子句,并且是指在它们的顶层 `SELECT` 下面的 `WITH` 子句: +要指定公用表表达式,请使用 `WITH` 具有一个或多个逗号分隔子句的子句。每个子条款都提供一个子查询,用于生成结果集,并将名称与子查询相关联。 + +在包含该 `WITH`子句 的语句中,可以引用每个 CTE 名称以访问相应的 CTE 结果集。CTE 名称可以在其他 CTE 中引用,从而可以基于其他 CTE 定义 CTE。 + +Doris **不支持** 递归 CTE。 + +## 示例 + +下面的示例定义名为的 CTE `cte1` 和 `cte2` 中 `WITH` 子句,并且是指在它们的顶层 `SELECT` 下面的 `WITH` 子句: ```sql WITH @@ -36,8 +45,3 @@ WITH SELECT b,d FROM cte1 JOIN cte2 WHERE cte1.a = cte2.c; ``` - -在包含该 `WITH`子句 的语句中,可以引用每个 CTE 名称以访问相应的 CTE 结果集。 - -CTE 名称可以在其他 CTE 中引用,从而可以基于其他 CTE 定义 CTE。 - diff --git a/versioned_docs/version-2.0/query/query-data/cte.md b/versioned_docs/version-2.0/query/query-data/cte.md index 902c26f6046..9f7fc0492a9 100644 --- a/versioned_docs/version-2.0/query/query-data/cte.md +++ b/versioned_docs/version-2.0/query/query-data/cte.md @@ -24,9 +24,19 @@ specific language governing permissions and limitations under the License. --> +## Description + Common Table Expression (CTE) define a temporary result set that can be referenced multiple times within the scope of an SQL statement. CTE are primarily used in SELECT statements. -To specify a CTE, use the WITH clause with one or more comma-separated clauses. Each clause provides a subquery that generates a result set and associates a name with the subquery. The following example defines CTE named cte1 and cte2 within the WITH clause and refers to them in the top-level SELECT below the WITH clause: +To specify a CTE, use the `WITH` clause with one or more comma-separated clauses. Each clause provides a subquery that generates a result set and associates a name with the subquery. + +Within the statement that contains the `WITH` clause, you can reference each CTE name to access the corresponding CTE result set. CTE names can be referenced in other CTE, allowing you to define CTE based on other CTE. + +Doris **DO NOT** support recursive CTE. + +## Example + +The following example defines CTE named cte1 and cte2 within the WITH clause and refers to them in the top-level SELECT below the WITH clause: ```sql WITH @@ -35,6 +45,3 @@ WITH SELECT b, d FROM cte1 JOIN cte2 WHERE cte1.a = cte2.c; ``` - -Within the statement that contains the WITH clause, you can reference each CTE name to access the corresponding CTE result set. CTE names can be referenced in other CTE, allowing you to define CTE based on other CTE. - diff --git a/versioned_docs/version-2.1/query-data/cte.md b/versioned_docs/version-2.1/query-data/cte.md index aeeea6c802c..941d74639a1 100644 --- a/versioned_docs/version-2.1/query-data/cte.md +++ b/versioned_docs/version-2.1/query-data/cte.md @@ -24,9 +24,19 @@ specific language governing permissions and limitations under the License. --> +## Description + Common Table Expression (CTE) define a temporary result set that can be referenced multiple times within the scope of an SQL statement. CTE are primarily used in SELECT statements. -To specify a CTE, use the WITH clause with one or more comma-separated clauses. Each clause provides a subquery that generates a result set and associates a name with the subquery. The following example defines CTE named cte1 and cte2 within the WITH clause and refers to them in the top-level SELECT below the WITH clause: +To specify a CTE, use the `WITH` clause with one or more comma-separated clauses. Each clause provides a subquery that generates a result set and associates a name with the subquery. + +Within the statement that contains the `WITH` clause, you can reference each CTE name to access the corresponding CTE result set. CTE names can be referenced in other CTE, allowing you to define CTE based on other CTE. + +Doris **DO NOT** support recursive CTE. + +## Example + +The following example defines CTE named cte1 and cte2 within the WITH clause and refers to them in the top-level SELECT below the WITH clause: ```sql WITH @@ -35,6 +45,3 @@ WITH SELECT b, d FROM cte1 JOIN cte2 WHERE cte1.a = cte2.c; ``` - -Within the statement that contains the WITH clause, you can reference each CTE name to access the corresponding CTE result set. CTE names can be referenced in other CTE, allowing you to define CTE based on other CTE. - diff --git a/versioned_docs/version-3.0/query-data/cte.md b/versioned_docs/version-3.0/query-data/cte.md index aeeea6c802c..941d74639a1 100644 --- a/versioned_docs/version-3.0/query-data/cte.md +++ b/versioned_docs/version-3.0/query-data/cte.md @@ -24,9 +24,19 @@ specific language governing permissions and limitations under the License. --> +## Description + Common Table Expression (CTE) define a temporary result set that can be referenced multiple times within the scope of an SQL statement. CTE are primarily used in SELECT statements. -To specify a CTE, use the WITH clause with one or more comma-separated clauses. Each clause provides a subquery that generates a result set and associates a name with the subquery. The following example defines CTE named cte1 and cte2 within the WITH clause and refers to them in the top-level SELECT below the WITH clause: +To specify a CTE, use the `WITH` clause with one or more comma-separated clauses. Each clause provides a subquery that generates a result set and associates a name with the subquery. + +Within the statement that contains the `WITH` clause, you can reference each CTE name to access the corresponding CTE result set. CTE names can be referenced in other CTE, allowing you to define CTE based on other CTE. + +Doris **DO NOT** support recursive CTE. + +## Example + +The following example defines CTE named cte1 and cte2 within the WITH clause and refers to them in the top-level SELECT below the WITH clause: ```sql WITH @@ -35,6 +45,3 @@ WITH SELECT b, d FROM cte1 JOIN cte2 WHERE cte1.a = cte2.c; ``` - -Within the statement that contains the WITH clause, you can reference each CTE name to access the corresponding CTE result set. CTE names can be referenced in other CTE, allowing you to define CTE based on other CTE. - --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
