This book is the definitive guide to SQL*Plus, Oracle's interactive query tool. Despite the wide availability and usage of SQL*Plus, few developers and DBAs know how powerful it really is. This book introduces SQL*Plus, provides a syntax quick reference, and describes how to write and execute script files, generate ad hoc reports, extract data from the database, query the data dictionary tables, use the SQL*Plus administrative features (new in Oracle8i), and much more.
Full Description
Very well organized, good examples, good writing. I was able to get out of it what I needed in a weekend. Nice job.
Thank you for a superb introduction to SQLPLUS. I can definitely be described as a novice - I attended an Oracle sql for end users course two years ago, but found it a difficult subject to grasp as I had no experience of using sql (and sharing a pc with another trainee did not help!). I thought I was doomed never to use it again.
I went into a shop two days ago looking for SQL for Dummies, but discovered your far more useful book and have suddenly discovered I can do it after all! I have impressed myself with my new found ability to write scripts (with lots of joins) and correctly format reports - a major breakthrough for a new consultant in the marketplace.
Thank you once again - this is the best value for money in the marketplace.
Just like the cover says - Definitive. My one complaint is that command-line arguments aren't in the book's index, although they're used in a few of the example scripts. (Call them &&1, &&2, etc. Here's a good approach - at start of script, have something like
, and then user will get an explanation of what args were expected. If the command-line args weren't entered, SQL*Plus will give another opportunity to enter them, as in
, so forth. Looks nice.)
The Ukrainian names are literary, not historical (off-the-wall correction of an earlier reader comment).
Truly superior technical text.
Oracle SQL*Plus: The Definitive Guide Review,
February 16 2000
Submitted by Robin
[
Respond |
View]
I've been coding PL/SQL and SQL for years, and when I saw this book, I thought "why on earth would they write a *whole* book about SQL Plus?". I was very impressed -- I discovered tips and code examples for many things that I had never tried, and I found myself picking up this book over and over again. It is a good general reference, and definitely a good book for a beginner.
Oracle SQL*Plus: The Definitive Guide Review,
January 13 2000
Submitted by Bill H
[
Respond |
View]
An excellent book. The combination of the clear text and downloaded examples make this book enjoyable to read.
Oracle SQL*Plus: The Definitive Guide Review,
December 06 1999
Submitted by Andrew Smith
[
Respond |
View]
Again, another fantastic Oracle publication from O'Reilly. It is both user-friendly and well-written. Thoroughly recommended.
Oracle SQL*Plus: The Definitive Guide Review,
October 27 1999
Submitted by Alex Campbell
[
Respond |
View]
This book is so good that whenever I look at another of my SQL books I unconsciously compare it to The Definitive Guide. They have all fallen short. I like both the readable style and density of information in one book. It also covers SQL Loader better than most other books.
Oracle SQL*Plus: The Definitive Guide Review,
September 10 1999
Submitted by Christopher Gait
[
Respond |
View]
Great book. I'm learning all kinds of things that turn SQL*Plus from a dinosaur into a useful tool for day-to-day work. I also enjoy the data being a mixture of Ukrainian historical figures, Dickens character(s) and author's family.
My only addition so far would be to tell people how to set your default editor if it isn't already set. This won't be an issue for most people, since Windows systems have this configured as part of their install. But Unix users will have to set this manually or put it into login.sql:
DEFINE _editor='vi'
There is a mention of this in the description of DEFINE, but nothing in the introduction to using the editor, which would leave beginning users of SQL*Plus in UNIX staring at a '?' wondering what to do (you can get rid of the ? with CTRL-D, which I found out by poking around the keyboard on 'all the usual suspects'). There is also no entry in the index which I could find about this.
I expect this book to join the rest of my O'Reilly books on the 'front line' of my computer library, usually open on or next to my desk.
Chris Gait
Oracle SQL*Plus: The Definitive Guide Review,
July 25 1999
Submitted by Ron Joffe
[
Respond |
View]
Great book, one of those that's always left open on my desk.
Thanks for making the sample code available,
running things through, really make the ideas sink in better
A few comments / corrections:
Page 186
Table 6-4 Columns in the ALL_CONSTRAINTS View
For the CONSTRAINT_TYPE, the contents is missing:
U = UNIQUE KEY
Page 200
Table Constraints
Sorry to be picky about this one, but :)
You State that :
ALL_CONSTRAINTS return one row for each constraint
, and is the only view you need to look at for the
definition of a check constraint.
Technically this is correct, becuase even if you
define a check constraint for a particular column
it can be coded as either a column constraint or
a table constraint, but without parsing the
search_condition column you can not obtain which
columns are affected.
Thanks for a great resource.
Oracle SQL*Plus: The Definitive Guide Review,
April 15 1999
Submitted by Michael Thomas
[
Respond |
View]
Hi,
This is a great book, and saves lots of time
if want to be a SQL*Plus power user. I'd like
to add one suggestion to p145, the DEFINE
command. Jonathan showed us how to define
CHAR substitution/user variables. Its also
possible to create NUMBER type variables.
-- define rolled_in total, but as number
col RT new_val r_tot format 999999 noprint
select sum(max(rollin_district)) RT
from log_activity
where trunc(first_login_date) = trunc(sysdate-&1)
group by name_district
/
Or, a simple DEFINE to NUMBER with 0 value.
-- define rollin = 0, but as number
col val99 new_val rollin noprint
select to_number(0) val99
from DUAL
/
SQL> define
DEFINE _O_VERSION = "Oracle8 Enterprise Edition Release 8.0.5.1.1 - Production
PL/SQL Release 8.0.5.1.0 - Production" (CHAR)
DEFINE _O_RELEASE = "800050101" (CHAR)
DEFINE R_DATE = "15-Apr-99" (CHAR)
DEFINE R_TOT = 2511 (NUMBER)
DEFINE ROLLIN = 0 (NUMBER)
SQL>
Then you can use these substitution/user
NUMBER variables in SQL statements in your scripts:
select to_char((sum(decode(
to_char(first_login_date,'hh24'),
0,1,1,1,2,1,3,1,4,1,5,1,6,1,0)) +
sum(decode(to_char(first_login_date,'hh24'),
7,1,0)) +
sum(decode(to_char(first_login_date,'hh24'),
8,1,0)))*100/&r_tot,'999.0')||'%' m
from log_activity a
Great job with this book.
Regards,
Mike Thomas
Oracle SQL*Plus: The Definitive Guide Review,
April 06 1999
Submitted by Jim Muldoon
[
Respond |
View]
Review of Oracle SQL*Plus, The Definitive Guide, by Jonathan Gennick; OReilly, 1999
I definitely recommend this book for anyone who uses Oracle SQL*Plus. This book is organized along two main lines: the body of the book containing various examples of SQL commands, and the Appendices which are good command references. The book also has a reference to the OReilly web site, which has the source for most of examples in the book. Even though the examples were set up for the Windows 95 version of Oracle 8.0, I was able to run most of them on a UNIX (AIX), Oracle 7.3.3 version. Most of the changes where due to case sensitivity. Since I am not a database administrator, I couldnt run any scripts requiring administrator privileges.
Further subdividing the main text of the book, the first part is for all users. The author starts out with background information about SQL*Plus, and its relation to some of the other Oracle components, such as PL/SQL and the Oracle database. The author then walks you through some basics of the SQL*Plus environment, such as editing, and gets you started by working with sample database included in the examples. The author also starts out early on getting you familiar with PL/SQL. Later chapters cover scripting, reporting, and extracting and loading data. The examples shown are very helpful.
The next section is for the more advanced user. This includes exploring the database, which shows how to find out the table structure, constraints, indexes, triggers, etc. You are shown how to access the tables of the data dictionary to give you these details, and how to produce a readable report from these. This section also includes advanced scripting which covers bind variables, how to simulate branching in the scripts, writing dynamic SQL scripts, and parsing and checking user input. Finally, tuning and timing queries is included in this section.
The next section deals with database administration issues. This includes giving users the privileges they need, but not letting them change things that would impact other users. Shutdown, startup, backup, and restore are also covered.
The final section is on customizing the environment, which contains hints and advice which I think are useful to all users. This covers settings which the user can control, plus global settings for all users.
Overall, I am very impressed with the book and find it to be a good reference for all user levels. If I were only allowed to have one book as a SQL*Plus reference, this would be it.
"One puzzling aspect of the O'Reilly series is how the publishers have managed to find competent authors when other companies seem unable to get anyone who can string a sentence together. You really get the feeling that the authors want to tell you how to solve a problem rather than demonstrate how clever they are...information you'd otherwise have to check in four of the Oracle manuals, and there's a human voice helping you." --Kay Ewbank, Computer Shopper , July 2000