Oracle 21c New Feature in SQL*Plus – set jsonprint

New sqlplus feature is introduced in Oracle 21c release sql plus for json output format, to illustrate:

SQL> show jsonprint

jsonprint NORMAL

SQL> select json(‘[{fname:”Emad”},{lname:”al-mousa”}]’) from dual;

JSON(‘[{FNAME:”EMAD”},{LNAME:”AL-MOUSA”}]’)

——————————————————————————–

[{“fname”:”Emad”},{“lname”:”al-mousa”}]

SQL> set jsonprint pretty

SQL> show jsonprint

jsonprint PRETTY

SQL> select json(‘[{fname:”Emad”},{lname:”al-mousa”}]’) from dual;

JSON(‘[{FNAME:”EMAD”},{LNAME:”AL-MOUSA”}]’)

——————————————————————————–

[

  {

    “fname” : “Emad”

  },

  {

    “lname” : “al-mousa”

  }

]

One thought on “Oracle 21c New Feature in SQL*Plus – set jsonprint

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s