Kayshav.com
About Developer Oracle 12c Oracle 19c Technology Information Sitemap

Oracle JSON_Object
-- Oracle 12c (12.2): Oracle JSON_Object

SELECT
 JSON_OBJECT(
          KEY 'Department-ID'    VALUE  qt.dept_id,
          KEY 'Department-Name'  VALUE  qt.dept_desc,
          KEY 'Department-Bldg'  VALUE  qt.bldg_cd
       ) AS departments
FROM 
 (SELECT  101  dept_id, 'Engineering'    dept_desc,  'A01' bldg_cd  
  FROM DUAL UNION
  SELECT  102  dept_id, 'Finance'        dept_desc,  'B01' bldg_cd    
  FROM DUAL UNION
  SELECT  103  dept_id, 'Human Resource' dept_desc,  'B02' bldg_cd    
  FROM DUAL UNION
  SELECT  104  dept_id, 'Information Tecnnology' dept_desc,  'A01' bldg_cd  
  FROM DUAL
 ) qt
;

Json Object Dept



JSON Reference    JSON_Query    JSON_Value

Oracle 12c Index    Oracle 19c Index

Oracle registered trademark of Oracle Corporation.

Last Revised On: June 27th, 2019

  11068