Изменения в новых версиях / SQL:2016

-- *** before: ***
-- a JSON document was a text column: the database could neither
-- read a field out of it nor check that it was valid

-- *** in version 2016: ***
SELECT
    JSON_OBJECT('name' VALUE Name, 'people' VALUE Population) AS doc
FROM country
WHERE Code = 'CHE';

SELECT JSON_VALUE(doc, '$.name'AS Name
FROM country_doc
WHERE JSON_EXISTS(doc, '$.people');

-- Support: Oracle 12c carries the standard functions in full, MS SQL
-- Server has JSON_VALUE and JSON_QUERY since 2016 and JSON_OBJECT since
-- 2022, PostgreSQL had jsonb since 9.4 and the standard names arrived in
-- 16 and 17, MySQL 5.7 and SQLite 3.38 read JSON with their own
-- functions (JSON_EXTRACT, the ->> operator). Firebird and Access have
-- nothing.