|
Oracle SQL Plus: The Definitive Guide 2nd Edition
Despite its wide availability and usage, few developers and
DBAs have mastered the true power of Oracle SQL*Plus. This
bestselling book--now updated for Oracle 10g--is the only
in-depth guide to this interactive query tool for writing
SQL scripts. It's an essential resource for any Oracle user.
The new second edition
of Oracle SQL*Plus: The Definitive
Guide clearly describes how to perform, step-by-step, all of
the tasks that Oracle developers and DBAs want to perform
with SQL*Plus--and maybe some you didn't realize you could
perform.
With Oracle SQL*Plus: The Definitive Guide, you'll expertly:
write and execute script files
generate ad hoc reports
extract data from the database
query the data dictionary tables
customize an SQL*Plus environment
and much more
It also includes a handy quick reference to all of its
syntax options and an often-requested chapter on SQL itself,
along with a clear, concise, and complete introduction.
This book is truly the definitive guide to SQL*Plus. It's an
indispensable resource for those who are new to SQL*Plus, a
task-oriented learning tool for those who are already using
it, and an immediately useful quick reference for every
user. If you want to leverage the full power and flexibility
of this popular Oracle tool, you'll need this book.
Preface
1. Introduction to SQL*Plus
What Is SQL*Plus?
History of SQL*Plus
Why Master SQL*Plus?
Creating and Loading the Sample Tables
2. Command-Line SQL*Plus
Starting Command-Line SQL*Plus
Starting Windows SQL*Plus
Some Basic SQL*Plus Commands
Running SQL Queries
Working With PL/SQL
The SQL Buffer
Line Editing
Executing the Statement in the Buffer
Saving and Retrieving the Buffer
The EDIT Command
Executing a Script
The Working Directory
3. Browser-Based SQL*Plus
Starting iSQL*Plus
Executing SQL*Plus Commands
Running SQL Queries
Working with PL/SQL
Executing Scripts
iSQL*Plus Command History
4. A Lightning SQL Tutorial
Data Manipulation Statements
Transactions
The Concept of Null
Table Joins
Sorting Query Results
Grouping and Summarizing
Subqueries
Unions
To Learn More
5. Generating Reports with SQL*Plus
Following a Methodology
Saving Your Work
Designing a Simple Report
Master/Detail Reports
6. Creating HTML Reports
Getting the Data into an HTML Table
Generating the Entire Page
Another Approach to Headers
Master/Detail Reports in HTML
7. Advanced Reports
Totals and Subtotals
Getting the Current Date into a Header
Report Headers and Footers
Formatting Object Columns
Summary Reports
Taking Advantage of Unions
8. Writing SQL*Plus Scripts
Why Write Scripts?
Using Substitution Variables
Prompting for Values
Cleaning Up the Display
Executing a Script
Controlling Variable Substitution
Commenting Your Scripts
Resetting Your SQL*Plus Environment
Scripting Issues with iSQL*Plus
9. Extracting and Loading Data
Types of Output Files
Limitations of SQL*Plus
Extracting the Data
An Excel-Specific HTML Hack
Reloading the Data
10. Exploring Your Database
The DESCRIBE Command
Oracle's Data Dictionary Views
Tables
Table Constraints
Indexes
Triggers
Synonyms
Table Security
Scripting the Data Dictionary
Using SQL to Write SQL
The Master Key
11. Advanced Scripting
Bind Variables
Branching in SQL*Plus
Looping in SQL*Plus
Validating and Parsing User Input
Error Handling
Returning Values to Unix
12. Tuning and Timing
Using SQL*Plus Timers
Using EXPLAIN PLANstatements
Using AUTOTRACE
Improving on EXPLAIN PLAN Results
Where to Find More Tuning Information
13. The Product User Profile
What Is the Product User Profile?
Using the Product User Profile
14. Customizing Your SQL*Plus Environment
SQL*Plus Settings You Can Control
The Site and User Profiles
Environment Variables That Affect SQL*Plus
Windows GUI SQL*Plus
iSQL*Plus User Preferences
A. SQL*Plus Command Reference
B. SQL*Plus Format Elements
Index
|