数据仓库服务 GAUSSDB(DWS)-COLLATE

时间:2024-12-10 11:28:49

COLLATE

在MySQL中,COLLATE表示默认的数据库排序规则。 GaussDB (DWS)不支持该属性修改表定义信息,DSC迁移时会将该关键字删除。

输入示例

1
2
3
4
5
6
7
8
CREATE TABLE `public`.`runoob_tbl_test`(
    `runoob_id` VARCHAR(30),
    `runoob_title` VARCHAR(100) NOT NULL,
    `runoob_author` VARCHAR(40) NOT NULL,
    `submission_date` VARCHAR(30)
) COLLATE=utf8_general_ci;

ALTER TABLE `public`.`runoob_tbl_test` COLLATE=utf8mb4_bin;

输出示例

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
CREATE TABLE "public"."runoob_tbl_test"
(
  "runoob_id" VARCHAR(120),
  "runoob_title" VARCHAR(400) NOT NULL,
  "runoob_author" VARCHAR(160) NOT NULL,
  "submission_date" VARCHAR(120)
)
  WITH ( ORIENTATION = ROW, COMPRESSION = NO )
  NOCOMPRESS
  DISTRIBUTE BY HASH ("runoob_id");
support.huaweicloud.com/tg-dws/dws_16_0128.html