Oracle SQLcl: Formatting your Query Results

Jeff Smith
Jeff SmithDistinguished Product Manager at Oracle Corp
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Oracle SQLcl & Formatting Query Results
Your Modern Oracle Database Command Line Interface (CLI)
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
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
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
OLD: SQL*Plus Style Default Output
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
NEW: SQLcl Formatted Output
Columns are ‘best fit’ per page of query results
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
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
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
INSERTs
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
CSV
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
DELIMITED – User optionally defines delimiters
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
XML
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
HTML (w/SPOOL)
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
JSON (raw or formatted)
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Color Coded – look for patterns in your data (regex)
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Custom Formatting with JavaScript (Nashhorn)
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Unicode/Multi-Byte Data, no problem!
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Fun with Colors
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Demonstration Video
1 of 18

More Related Content

Recently uploaded(20)

CXL at OCPCXL at OCP
CXL at OCP
CXL Forum203 views
Web Dev - 1 PPT.pdfWeb Dev - 1 PPT.pdf
Web Dev - 1 PPT.pdf
gdsczhcet49 views
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
Prity Khastgir IPR Strategic India Patent Attorney Amplify Innovation24 views
Liqid: Composable CXL PreviewLiqid: Composable CXL Preview
Liqid: Composable CXL Preview
CXL Forum120 views
ChatGPT and AI for Web DevelopersChatGPT and AI for Web Developers
ChatGPT and AI for Web Developers
Maximiliano Firtman161 views

Oracle SQLcl: Formatting your Query Results

  • 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. 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. 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. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | OLD: SQL*Plus Style Default Output
  • 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. 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. 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. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | INSERTs
  • 9. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | CSV
  • 10. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | DELIMITED – User optionally defines delimiters
  • 11. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | XML
  • 12. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | HTML (w/SPOOL)
  • 13. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | JSON (raw or formatted)
  • 14. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Color Coded – look for patterns in your data (regex)
  • 15. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Custom Formatting with JavaScript (Nashhorn)
  • 16. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Unicode/Multi-Byte Data, no problem!
  • 17. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Fun with Colors
  • 18. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Demonstration Video