COLUMN_JSON

Syntax

COLUMN_JSON(dyncol_blob)

Description

Returns a JSON representation of data in dyncol_blob. Can also be used to display nested columns. See dynamic columns for more information.

Example

SELECT item_name, COLUMN_JSON(dynamic_cols) FROM assets;
+-----------------+----------------------------------------+
| item_name       | COLUMN_JSON(dynamic_cols)              |
+-----------------+----------------------------------------+
| MariaDB T-shirt | {"size":"XL","color":"blue"}           |
| Thinkpad Laptop | {"color":"black","warranty":"3 years"} |
+-----------------+----------------------------------------+

This page is licensed: CC BY-SA / Gnu FDL

Last updated

Was this helpful?