forked from docs/doc-exports
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>
7.5 KiB
7.5 KiB
LOB Types
Overview
A BLOB is a binary large object that can hold a variable amount of data. The four BLOB types are TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB. The only difference between these four types is the maximum length of the values they can contain. DSC supports the following type conversions:
Type Mapping
MySQL LOB Type |
MySQL INPUT |
GaussDB(DWS) OUTPUT |
---|---|---|
TINYBLOB |
TINYBLOB |
BLOB |
BLOB |
BLOB |
BLOB |
MEDIUMBLOB |
MEDIUMBLOB |
BLOB |
LONGBLOB |
LONGBLOB |
BLOB |
Input: [TINY|MEDIUM|LONG]BLOB
CREATE TABLE IF NOT EXISTS `runoob_dataType_test`( `dataType_1` BIGINT, `dataType_2` TINYBLOB, `dataType_3` BLOB, `dataType_4` MEDIUMBLOB, `dataType_5` LONGBLOB );
Output
CREATE TABLE IF NOT EXISTS "public"."runoob_datatype_test" ( "datatype_1" BIGINT, "datatype_2" BLOB, "datatype_3" BLOB, "datatype_4" BLOB, "datatype_5" BLOB ) WITH ( ORIENTATION = ROW, COMPRESSION = NO ) NOCOMPRESS DISTRIBUTE BY HASH ("datatype_1");
Parent topic: Data Types