Tag: json

Oracle Query Returns JSON

I’m using Oracle a lot in my new job; and, in the process, I am learning about a lot of neat Oracle database features. Today, I discovered json_array. Wrap the selected columns in json_array followed by a name for the result set

SELECT json_array(C1.circuit_design_id,

circuit_position.CIRCUIT_NODE_STATUS, circuit_position.circuit_design_id_3) jsonCircuitResults

FROM circuit C1

LEFT OUTER JOIN circuit_position on C1.circuit_design_id = circuit_position.circuit_design_id

WHERE C1.circuit_design_id = ‘54535525’ and circuit_position.circuit_design_id_3 is not null;

The response is JSON –