doc-exports/docs/dws/tool/dws_16_0136.html
Lu, Huayi 27019c2991 DWS TOOL 830.201 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2024-05-16 07:35:25 +00:00

1.8 KiB

FOREIGN_KEY_CHECKS

For foreign key constraints in MySQL, GaussDB(DWS) does not support them modifying table definition. They will be deleted during DSC migration.

Input

set foreign_key_checks = 0;
Create Table mall_order_dc (
    id bigint NOT NULL AUTO_INCREMENT,
    order_id varchar(50) NOT NULL,
    key order_id(order_id)
);

Output

CREATE TABLE "public"."mall_order_dc" (
  "id" BIGSERIAL NOT NULL,
  "order_id" VARCHAR(200) NOT NULL
) WITH (ORIENTATION = ROW, COMPRESSION = NO) NOCOMPRESS DISTRIBUTE BY HASH ("id");
CREATE INDEX "order_id" ON "public"."mall_order_dc" USING BTREE ("order_id");