Updated on 2024-12-06 GMT+08:00

Binary Data Types

Table 1 Binary data types

No.

MySQL

GaussDB

Difference

1

BINARY[(M)]

Not supported

-

2

VARBINARY(M)

Not supported

-

3

TINYBLOB

Supported

  • Value range: The value is of the BYTEA type. The length limit is 1 GB, not 255 bytes. If the length exceeds the limit, no error or truncation alarm is reported in strict or loose mode.
  • Input format: Escape characters and double quotation marks ("") are not supported.
  • Output format: For the '\0' character, the query result is displayed as '\000'. If the getBytes API of the JDBC driver is used, the result is the '\0' character.
  • Operator: Arithmetic operators (+, -, *, /, and %) are not supported. Common logical operators OR, AND, NOT (||, &&, and !) are not supported. Common bitwise operators (~, &, |, and ^) are not supported.

4

BLOB

Supported

  • Value range: The value is of the BYTEA type. The length limit is 1 GB, not 65535 bytes. If the length exceeds the limit, no error or truncation alarm is reported in strict or loose mode. However, MySQL supports these functions.
  • Input format: Escape characters and double quotation marks ("") are not supported.
  • Output format: For the '\0' character, the query result is displayed as '\000'. If the getBytes API of the JDBC driver is used, the result is the '\0' character.
  • Operator: Arithmetic operators (+, -, *, /, and %) are not supported. Common logical operators OR, AND, NOT (||, &&, and !) are not supported. Common bitwise operators (~, &, |, and ^) are not supported.

5

MEDIUMBLOB

Supported

  • Value range: The value is of the BYTEA type. The length limit is 1 GB, not 16777215 bytes. If the length exceeds the limit, no error or truncation alarm is reported in strict or loose mode. However, MySQL supports these functions.
  • Input format: Escape characters and double quotation marks ("") are not supported.
  • Output format: For the '\0' character, the query result is displayed as '\000'. If the getBytes API of the JDBC driver is used, the result is the '\0' character.
  • Operator: Arithmetic operators (+, -, *, /, and %) are not supported. Common logical operators OR, AND, NOT (||, &&, and !) are not supported. Common bitwise operators (~, &, |, and ^) are not supported.

6

LONGBLOB

Supported

  • Value range: The value is of the BYTEA type. The upper limit is 1 GB. For details about the range, see the centralized and distributed specifications of the BYTEA data type.
  • Input format: Escape characters and double quotation marks ("") are not supported.
  • Output format: For the '\0' character, the query result is displayed as '\000'. If the getBytes API of the JDBC driver is used, the result is the '\0' character.
  • Operator: Arithmetic operators (+, -, *, /, and %) are not supported. Common logical operators OR, AND, NOT (||, &&, and !) are not supported. Common bitwise operators (~, &, |, and ^) are not supported.

7

BIT[(M)]

Not supported

-