Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Is there any way to replace null to empty string in JSON_OBJECT

ronald_2017Jun 6 2024

Hello All,

I use Oracle 19c, is there a way to replace null value to empty string?


select 
  json_object(key 'c1' value c1) 
from (
  select '' c1 from dual
);
{"c1":null}

I want below.

{"c1":""}

Thanks in advance

Comments
Post Details
Added on Jun 6 2024
3 comments
1,589 views