title: How to select values from JSON in MySQL?
body: <p>can anyone tell me what is wrong with this query?</p>
  <pre><code>DECLARE @json LONGTEXT;
  
  SET @json = '[ { &quot;name&quot;:&quot;John Smith&quot;,  &quot;address&quot;:&quot;780 Mission St, San Francisco, CA 94103&quot;}, { &quot;name&quot;:&quot;Sally Brown&quot;,  &quot;address&quot;:&quot;75 37th Ave S, St Cloud, MN 94103&quot;}, { &quot;name&quot;:&quot;John Johnson&quot;,  &quot;address&quot;:&quot;1262 Roosevelt Trail, Raymond, ME 04071&quot;}     ]';
  
  ##SELECT @json;
  
  SELECT * FROM JSON_TABLE (@json, '$[*]' COLUMNS (
                  name VARCHAR(40)  PATH '$.name',
                  address VARCHAR(100) PATH '$.address'));
  </code></pre>
  <p>The error that I get is:</p>
  <blockquote>
  <p>You have an error in your SQL syntax; check the manual that
  corresponds to your MySQL server version for the right syntax to use
  near '(@json, '$[*]' COLUMNS (
  name VARCHAR(40)  PATH '$.name',
  ' at line 1</p>
  </blockquote>
  <p>Just for Information I am using  TOAD as tool to connect to my cloud my sql instance.</p>