In Oracle 21c, it looks like we can return a resultset as JSON text: SELECT json_object(*) from dual; result: {"DUMMY":"X"} ------------- That works in db<>fiddle: [![enter image description here][1]][1] [db<>fiddle][2] ---------- **Question:** Is there a way to return the JSON text using pretty formatting? { "DUMMY":"X" } [1]: https://i.sstatic.net/FG610.png [2]: https://dbfiddle.uk/?rdbms=oracle_21&fiddle=9abea6f8f6c5d470bb33335acdd9e413