Skip to content
Advertisement

Get array size in oracle sql

I have a table in oracle with this definition

Document is stored in a json format.

How can i extract size for array parameters in sql?

I need extract array size for each table record, and after sum all this values.

ex:

1 step:

2 step:

Can someone please give me an idea how to do that ?

Advertisement

Answer

Provided you have an is json check constraint on the column, you can use the size() method to get the number elements in an array:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement