Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I want to convert a json array into a set of rows in Oracle.
Input:
'["a","b","c"]'
Output:
col_name --------- a b c
PostgreSQL provides the function, jsonb_array_elements(jsonb) to do this.
How can I do this in Oracle 18c. Thank you.
You can use JSON_TABLE
JSON_TABLE
SELECT value FROM json_table( (select js from samp) , '$[*]' COLUMNS (value PATH '$') )
Replace js with your columnname & samp with your tablename in the above query
Check Demo Here
Add a comment
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.