更新时间:2024-12-10 GMT+08:00
FOREIGN_KEY_CHECKS
MySQL中的外键约束,GaussDB(DWS)不支持该属性修改表定义信息,DSC迁移时会将该属性删除。
输入示例
1 2 3 4 5 6 |
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) ); |
输出示例
1 2 3 4 5 |
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"); |
父主题: 表(可选参数、操作)