title: How to update JSON data type column in MySQL 5.7.10?
body: <p>I have started using MySQL 5.7.10 recently and I am liking the native JSON Data type a lot.</p>
  
  <p>But I ran into a problem when it comes to updating a JSON type value.</p>
  
  <p><strong>Questions:</strong></p>
  
  <p>Below is the table format, here I want to add 1 more key in JSON <code>data</code> column for <code>t1</code> table. Right now I have to fetch the value modify it and Update the table. So it involves an extra <code>SELECT</code> statement.</p>
  
  <p>I can insert like this </p>
  
  <pre><code>INSERT INTO t1 values ('{"key2":"value2"}', 1);
  
  mysql&gt; select * from t1;
  +--------------------+------+
  | data               | id   |
  +--------------------+------+
  | {"key1": "value1"} |    1 |
  | {"key2": "value2"} |    2 |
  | {"key2": "value2"} |    1 |
  +--------------------+------+
  3 rows in set (0.00 sec)
  
  mysql&gt;Show create table t1;
  
  
  +-------+-------------------------------------------------------------
  
  -------------------------------------------------------+
  | Table | Create Table                                                                                                       |
  +-------+--------------------------------------------------------------------------------------------------------------------+
  | t1    | CREATE TABLE `t1` (
    `data` json DEFAULT NULL,
    `id` int(11) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
  +-------+--------------------------------------------------------------------------------------------------------------------+
  1 row in set (0.00 sec)
  </code></pre>
  
  <p>Is there a work around for this?</p>