You are previewing Oracle SQL*Plus Pocket Reference.
O'Reilly logo
Oracle SQL*Plus Pocket Reference

Book Description

This pocket reference provides quick reference information that will help you use SQL*Plus, Oracle's interactive query tool. It summarizes all of the SQL*Plus syntax, including the syntax for new Oracle8i release 8.1.6 features. SQL*Plus is available at every Oracle site--from the largest data warehouse to the smallest single-user system--and it's a critical tool for virtually every Oracle user. Despite its wide use, few developers and DBAs know how powerful a tool SQL*Plus can be. This book boils down the most vital information from Gennick's best-selling book, Oracle SQL*Plus: The Definitive Guide, into an accessible summary. It concisely describes interacting with SQL*Plus, selecting data, formatting reports with SQL*Plus, and tuning SQL queries. It also contains quick references to the SQL*Plus commands and format elements. This book is an indispensable companion to O'Reilly bestselling book, Oracle SQL*Plus: The Definitive Guide, but it does not replace it; the larger book is truly the definitive guide, suitable for readers at all levels of expertise. The definitive guide describes the many tasks that SQL*Plus can perform, and provides a tutorial on many SQL*Plus topics. But this quick reference is an excellent, portable resource for readers who want a pocket-sized summary of SQL*Plus capabilities and a reminder of how to issue specific commands and formatting options for SQL*Plus. Table of Contents:

  1. Interacting with SQL*Plus

  2. Selecting Data

  3. Formatting Reports

  4. Tuning SQL

  5. SQL*Plus Format Elements

  6. SQL*Plus Command Reference

Table of Contents

  1. Oracle SQL*Plus Pocket Reference
    1. 1. Oracle SQL*PlusPocket Reference
      1. Introduction
        1. Acknowledgments
        2. Conventions
      2. Interacting with SQL*Plus
        1. Starting SQL*Plus
          1. Syntax for the sqlplus command
        2. Entering Commands
          1. Entering SQL*Plus commands
          2. Entering SQL statements
          3. Entering PL /SQL blocks
        3. Strings in SQL*Plus Commands
        4. Specifying Filenames
        5. Naming Variables
          1. Using column aliases
      3. Selecting Data
        1. The SELECT Statement
          1. Selecting columns from a table
          2. Ordering query results
          3. Restricting query results
        2. Null Values
          1. Using the NVL function
        3. Table Joins
          1. Inner and outer joins
        4. Summary Queries
          1. Using aggregate functions
          2. Using GROUP BY
          3. Restricting summarized results
          4. Using ALL and DISTINCT
        5. Unions
      4. Formatting Reports
        1. Column Headings
        2. Column Formats
        3. Page Width and Length
        4. Page Headers and Footers
          1. Defining a title
          2. Getting the date into a title
        5. Page Breaks
        6. Report Breaks
          1. The BREAK command
          2. The COMPUTE command
      5. Tuning SQL
        1. Creating the Plan Table
        2. Explaining a Query
          1. EXPLAIN PLAN syntax
          2. EXPLAIN PLAN example
        3. Querying the Plan Table
        4. Using Optimizer Hints
          1. Optimizer goal hints
          2. Access method hints
          3. Join order hints
          4. Join operation hints
          5. Parallel execution hints
      6. SQL*Plus Format Elements
        1. Formatting Numbers
        2. Formatting Character Strings
        3. Formatting Dates
      7. SQL*Plus Command Reference
        1. Comment Delimiters (/*...*/)
        2. Double Hyphen (--)
        3. At Sign (@)
        4. Double At Sign (@@)
        5. Forward Slash (/)
        6. ACCEPT
        7. APPEND
        8. ARCHIVE LOG
        9. ATTRIBUTE
        10. BREAK
        11. BTITLE
        12. CHANGE
        13. CLEAR
        14. COLUMN
        15. COMPUTE
        16. CONNECT
        17. COPY
        18. DEFINE
        19. DEL
        20. DESCRIBE
        21. DISCONNECT
        22. EDIT
        23. EXECUTE
        24. EXIT
        25. GET
        26. HELP
        27. HOST
        28. INPUT
        29. LIST
        30. PASSWORD
        31. PAUSE
        32. PRINT
        33. PROMPT
        34. QUIT
        35. RECOVER
        36. REMARK
        37. REPFOOTER
        38. REPHEADER
        39. RUN
        40. SAVE
        41. SET
        42. SHOW
        43. SHUTDOWN
        44. SPOOL
        45. START
        46. STARTUP
        47. STORE
        48. TIMING
        49. TTITLE
        50. UNDEFINE
        51. VARIABLE
        52. WHENEVER