title: How to create and insert a JSON object using MySQL queries?
body: <p>I'm trying to create a JSON object and then read the values from it into MySQL table. But I'm facing errors and I'm new to both JSON and MySQL.</p>
  
  <pre><code>SET @j = '{"key1": "value1", "key2": "value2"}';
  CREATE TABLE Person (name int,id int);
  INSERT INTO Person (name,id) SELECT * FROM OPENJSON(@j) WITH (name int,id int);
  </code></pre>