mysqljsonpostgresql-json

JSON support in SQL Standard, PostreSQL, and MySQL


I have been trying to gather some information regarding JSON support in SQL but Google doesn't help much. The more I search the more confused I become. Here are my simple questions:

Btw, I am mostly interested in PostreSQL and MySQL JSON support.

Thank you in advance.


Solution

  • There is a draft standard for SQL/JSON but it is still not publicly available. It is mostly driven by Oracle so they are aligned with the standard. SQL Server is similar with some syntax/naming changes (e.g. instead of JSON_TABLE it uses OPENJSON syntax but functionality is similar). Oracle/MSSQL use JSON as text representation, PostgreSQL/MySQL have types. You can see overview of functions here:

    http://ocelot.ca/blog/blog/2015/11/26/standard-sqljson-and-mysql-5-7-json/