更新时间:2024-12-10 GMT+08:00
DIRECTORY
DIRECTORY表示允许在数据目录和索引目录之外创建表空间。DIRECTORY包含DATA DIRECTORY和INDEX DIRECTORY。GaussDB(DWS)不支持该属性修改表定义信息,DSC迁移时会将该属性删除。
输入示例
1 2 3 4 5 6 7 8 9 10 11 |
CREATE TABLE `public`.`runoob_tbl_test1` ( `dataType1` int NOT NULL AUTO_INCREMENT, `dataType2` DOUBLE(20,8), PRIMARY KEY(`dataType1`) ) ENGINE=MYISAM DATA DIRECTORY = 'D:\\input' INDEX DIRECTORY= 'D:\\input'; CREATE TABLE `public`.`runoob_tbl_test2` ( `dataType1` int NOT NULL AUTO_INCREMENT, `dataType2` DOUBLE(20,8), PRIMARY KEY(`dataType1`) ) ENGINE=INNODB DATA DIRECTORY = 'D:\\input'; |
输出示例
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
CREATE TABLE "public"."runoob_tbl_test1" ( "datatype1" SERIAL NOT NULL, "datatype2" DOUBLE PRECISION, PRIMARY KEY ("datatype1") ) WITH ( ORIENTATION = ROW, COMPRESSION = NO ) NOCOMPRESS DISTRIBUTE BY HASH ("datatype1"); CREATE TABLE "public"."runoob_tbl_test2" ( "datatype1" SERIAL NOT NULL, "datatype2" DOUBLE PRECISION, PRIMARY KEY ("datatype1") ) WITH ( ORIENTATION = ROW, COMPRESSION = NO ) NOCOMPRESS DISTRIBUTE BY HASH ("datatype1"); |
父主题: 表(可选参数、操作)