Skip to content
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

[Doc] update case-sensitive description for column alias (backport #45227) #45233

Merged
merged 4 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/en/reference/System_limit.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ This topic describes the rules and limits that apply when you use StarRocks.
- Naming conventions for catalogs, databases, tables, views, partitions, columns, usernames, and roles:

- The name can only consist of digits (0-9), letters (a-z or A-Z), and underscores (\_). **Usernames can be all digits.**
- The name cannot exceed 64 characters in length, **among which the catalog, database, table, and column names cannot exceed 1023 characters in length.**
- Catalog, database, table, view, partition, and roles names must start with a lowercase or uppercase letter.
- Column names can start with an underscore (\_).
- Catalog, database, table, view, username, and role names are case-sensitive. Column and partition names are **not** case-sensitive.
- The name can start with a letter or an underscore (\_).
- The name cannot exceed 64 characters in length, **among which:**
- Database name cannot exceed 256 characters.
- Table name and column name cannot exceed 1024 characters.
- Username cannot exceed 128 characters.
- Column name (column alias), partition name, and index name are **not** case-sensitive. Other names are **case-sensitive**.

- Naming conventions for labels:
You can specify the label of a job when you import data. The label name can consist of underscores (\_), letters (a-z or A-Z), and digits (0-9), and cannot exceed 128 characters in length. The label name has no requirement for the starting character.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ When an alias is needed, you can simply add an AS clause after the table, column

If an alias or other identifier has the same name as an internal [StarRocks keyword](../keywords.md), you need to enclose the name in a pair of backticks, for example, `rank`.

Aliases are case sensitive.
Aliases are case-sensitive, but column aliases and expression aliases are not case-sensitive.

Examples:

Expand Down
12 changes: 7 additions & 5 deletions docs/zh/reference/System_limit.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ displayed_sidebar: "Chinese"

- 对数据目录名 (Catalog)、数据库名、表名、视图名、分区名、列名、用户名、角色名的要求:
- 只能由数字 (0-9)、字母 (a-z或A-Z),以及下划线 (\_) 组成。**用户名 (username) 可以使用纯数字命名。**
- 长度不能超过 64 个字符。**其中,数据目录名、数据库名、表名、列名不能超过 1023 字符 (≤ 1023)。**
- 数据目录名、数据库名、表名、视图名、分区名、以及角色名均只能以小写或大写字母开头。
- 列名可以下划线开头。
- 数据目录名、数据库名、表名、视图名、用户名、角色名**大小写敏感**,列名和分区名**大小写不敏感**。

- 可以以字母或下划线开头。
- 长度不能超过 64 个字符。**几个特殊情况:**
- 数据库名不能超过 256 个字符。
- 表名和列名不能超过 1024 个字符。
- 用户名 (username) 不能超过 128 个字符。
- 列名(包括列别名)、分区名、索引名大小写**不敏感**,其他名称大小写**敏感**。

- 对标签(Label)名的要求:

导入数据时可指定任务的标签(Label)。标签名可由数字 (0-9)、字母(a-z或A-Z),以及下划线(\_)组成,且长度不能超过 128 个字符。标签名对起始字符无要求。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ mysql> select varchar_column from small_table where varchar_column regexp 'm.*';

在查询中书写表名、列名,或者包含列的表达式的名字时,可以通过 AS 给它们分配一个别名。

当需要使用表名、列名时,可以使用别名来访问。别名通常相对原名来说更简短更容易记忆。当需要新建一个别名时,只需在 select list 或者 from list 中的表、列、表达式名称后面加上 AS alias 子句即可。AS 关键词是可选的,用户可以直接在原名后面指定别名。如果别名或者其他标志符和 [StarRocks 内部保留关键字](../keywords.md)同名时,需要在该名称加上反引号,比如 `rank`。**别名对大小写敏感**。
当需要使用表名、列名时,可以使用别名来访问。别名通常相对原名来说更简短更容易记忆。当需要新建一个别名时,只需在 select list 或者 from list 中的表、列、表达式名称后面加上 AS alias 子句即可。AS 关键词是可选的,用户可以直接在原名后面指定别名。如果别名或者其他标志符和 [StarRocks 内部保留关键字](../keywords.md)同名时,需要在该名称加上反引号,比如 `rank`。**别名对大小写敏感,但是列别名和表达式别名对大小写不敏感**。

示例:

Expand Down
Loading