Here are two ways you can use SQLcl or SQL*Plus to check your Oracle Database compatibility level.
sqlcl
How to Prettify JSON Formatted Query Results in SQLcl (Oracle)
If you use SQLcl to query Oracle Database, you might be aware of the SET SQLFORMAT json option, that makes query results come back as JSON documents.
But there’s also a json-formatted option, which returns the results in a more human readable format.
How to Export Oracle Query Results to a JSON File when using SQLcl
When using SQLcl with Oracle Database, you can export your query results to a JSON file with the SPOOL command.
How to Export Query Results to a .txt File when using SQLcl (Oracle)
When querying Oracle Database, you can use the SPOOL command to export your query results to a text file when using SQLcl.
How to Remove “X Rows Selected” in SQLcl & SQL*Plus (Oracle)
When using SQLcl or SQL*Plus with Oracle Database, you may have noticed feedback at the bottom of your query results that tells you how many rows were selected. For example, 100 rows selected (or however many rows were returned).
If you want to get rid of this, you can use SET FEEDBACK OFF.
You also have the option of setting a row threshold, which allows you to specify how many rows should be returned before feedback is provided.
2 Ways to Format your Query Results in SQLcl (Oracle)
When using SQLcl to run queries against Oracle Database, you can specify the output of the query results using the following two options:
- The
SET SQLFORMATcommand - Add a comment shortcut to your query
Export Query Results to an XML File when using SQLcl (Oracle)
When using SQLcl with Oracle Database, you can export your query results to an XML file with the SPOOL command.
SQLcl Formatting Options (Oracle)
When using SQLcl to query Oracle Database, you can use the SET SQLFORMAT command to determine the format of the results.
You can also use inline comments to specify the format from directly within your query.
Export Oracle Query Results to an HTML File when using SQLcl
When using SQLcl with Oracle Database, you can use the SPOOL command to export your query results to a file with an .html extension, and you can set SQLFORMAT to html in order to output the actual query results in HTML format.