GBase 8a集群统一字段列名大小写

参数

通过参数gbase_show_ident_case_sensitive控制
0 = 默认, 创建时指定的一致
1 = 小写, 所有列名输出小写
2 = 大写, 所有列名输出大写

影响范围:

show create table/view
desc table_name
show column
show index
columns元数据表
gcdump导出表结构时

涉及版本:8.6.2Build43R20
测试版本:V9.5.2.23

不影响Select查询

gbase> set global gbase_show_ident_case_sensitive=2;
Query OK, 0 rows affected (Elapsed: 00:00:00.00)

gbase>
gbase>
gbase> select * from colors;
+----------+-------------+
| color_id | color_value |
+----------+-------------+
| c001     | Red         |
| c002     | Yellow      |
| c003     | Green       |
| c004     | Black       |
| c005     | White       |
+----------+-------------+
5 rows in set (Elapsed: 00:00:00.01)

gbase>
gbase>
gbase>
gbase> desc colors;
+-------------+--------------+------+-----+---------+-------+
| Field       | Type         | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+-------+
| COLOR_ID    | varchar(100) | YES  |     | NULL    |       |
| COLOR_VALUE | varchar(100) | YES  |     | NULL    |       |
+-------------+--------------+------+-----+---------+-------+
2 rows in set (Elapsed: 00:00:00.01)

gbase> show create table colors;
+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table  | Create Table                                                                                                                                                                |
+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| colors | CREATE TABLE "colors" (
  "COLOR_ID" varchar(100) DEFAULT NULL,
  "COLOR_VALUE" varchar(100) DEFAULT NULL
) ENGINE=EXPRESS DEFAULT CHARSET=utf8 TABLESPACE='sys_tablespace' |
+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (Elapsed: 00:00:00.01)

发表评论

您的电子邮箱地址不会被公开。