Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Oracle SQLcl: Formatting your Query Results

613 views

Published on

Get clean, easy to read output from your Oracle SQL queries automatically with Oracle SQLcl. Examples of each output formatting type including INSERTs, JSON, CSV, and more!

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Oracle SQLcl: Formatting your Query Results

  1. 1. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle SQLcl & Formatting Query Results Your Modern Oracle Database Command Line Interface (CLI)
  2. 2. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle SQL Tools History User Friendly Interface  UFI 1979 SQLDev 1.1  SQL Worksheet with Script Engine (F5)  Basic SQL*Plus Support  Ships with 11gR1 SQL*Plus  UFI Advanced  Ships with Oracle v5 20071985 2008 2015 SQLcl takes existing SQL*Plus engine in SQL Developer to a new CLI  Standalone or included with 12c DB  ships with 12cR2  Supports 11gR2 and higher  Available on OCI via YUM sqlplusW & iSQL*Plus discontinued  no longer shipped as of Oracle Database 11g 1998 iSQL*Plus  Web Based SQL*Plus  Ships with 8i (Internet) 1993 SQL*Plus GUI  sqlplusW.exe  Windows ONLY
  3. 3. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | SQLcl: a modern take on SQL*Plus Included with SQL Developer, also available as a separate download/program  Java 8 JRE or higher  24 MB download  Unzip & Go  No Client Required Supports all of your favorite SQL*Plus Commands
  4. 4. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | OLD: SQL*Plus Style Default Output
  5. 5. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | NEW: SQLcl Formatted Output Columns are ‘best fit’ per page of query results
  6. 6. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Formats Available  Classic (SQL*Plus)  ANSICONSOLE (Formatted)  INSERT  CSV  DELIMITED  XML  HTML  JSON & JSON-Formatted  Color Coding  Custom
  7. 7. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Classic, SQL*Plus Support Remains  COLUMN SALARY FORMAT $99,990  C/oldval/newval  DESC  & and &&  pretty much everything else you LOVE about SQL*Plus
  8. 8. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | INSERTs
  9. 9. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | CSV
  10. 10. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | DELIMITED – User optionally defines delimiters
  11. 11. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | XML
  12. 12. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | HTML (w/SPOOL)
  13. 13. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | JSON (raw or formatted)
  14. 14. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Color Coded – look for patterns in your data (regex)
  15. 15. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Custom Formatting with JavaScript (Nashhorn)
  16. 16. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Unicode/Multi-Byte Data, no problem!
  17. 17. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Fun with Colors
  18. 18. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Demonstration Video

×