mysql 5.7新特新
从 MySQL 5.7.8 开始,MySQL 支持原生的 JSON 数据类型。 创建 JSON 类似 varchar,设置 JSON 主要将字段的 type 是 json, 不能设置长度,可以是 NULL 但不能有默认值。 mysql> CREATE TABLE lnmp ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `category` JSON, `tags` JSON, PRIMARY KEY (`id`) ); mysql> DESC lnmp; +----------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------+------------------+------+-----+---------+----------------+ | id | int(10) unsigned | NO | PRI | NULL | auto_increment | | category | json | YES | | NULL | | | tags | json | YES | | NULL | | +----------+---------