Updated on 2024-11-11 GMT+08:00

JSON

Table 1 JSON Data Type

No.

MySQL

GaussDB

Difference

1

JSON

Supported, with differences.

GaussDB supports the JSON data type. Compared with MySQL, GaussDB has the following differences in specifications:

  • Value range:

    In MySQL, the maximum size of the JSON data type is 4 GB. However, in GaussDB, the maximum size of the JSON data type is less than 1 GB, and the maximum number of key-value pairs of an object and the maximum number of elements in an array are also less than those in MySQL.

  • Difference in collation:

    In MySQL, when the collation function is used to separately query columns of the JSON type, the returned collation is BINARY. However, utf8mb4_bin is returned in GaussDB. In other scenarios, utf8mb4_bin is used, which is the same as that of MySQL.