COLUMN_ADD()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Enterprise Server
Topics on this page:
Overview
Adds or updates a dynamic column to the given specification.
EXAMPLES
CREATE TABLE t1 (b TINYBLOB);
INSERT INTO t1 VALUES (COLUMN_CREATE('Column1',REPEAT('a',10)));
UPDATE t1 SET b = COLUMN_ADD(b,'Column2',REPEAT('b',10));
UPDATE t1 SET b = COLUMN_ADD(b,'Column3',REPEAT('c',10));
SELECT COLUMN_JSON(b) FROM t1;
+------------------------------------------------------------------------+
| COLUMN_JSON(b) |
+------------------------------------------------------------------------+
| {"Column1":"aaaaaaaaaa","Column2":"bbbbbbbbbb","Column3":"cccccccccc"} |
+------------------------------------------------------------------------+
CHANGE HISTORY
EXTERNAL REFERENCES
Additional information on this topic may be found in the MariaDB Public Knowledge Base.