By Sanjay Mishra, Alan Beaulieu
April 2002
Pages: 336
ISBN 10: 0-596-00129-0 |
ISBN 13: 9780596001292
![]()
![]()
![]()
![]()
(Average of 6 Customer Reviews)
This book has been updated—the edition you're requesting is OUT OF PRINT. Please visit the catalog page of the latest edition.
The latest edition is also available on Safari Books Online.
Few books on the market today go beyond discussing syntax and the barest rudiments of using Oracle SQL. This book changes that. The authors cover the full range of Oracle SQL features that apply to query writing. Learn to write UNION queries that take full advantage of SQL's set orientation, and ways to use Oracle's new analytic SQL features to write ranking queries, lag and lead queries, and more.
Full Description
- Leverage Oracle's vast library of built-in SQL functions
- Query time-based data, and write joins involving date and time ranges
- Use Oracle SQL's hierarchical query features to deal with data best represented in a tree format
- Use DECODE and CASE to implement conditional logic in your queries
- Use Oracle's new, analytic SQL features to write ranking queries, lag and lead queries, windowing queries, and more
- Join data from two or more tables using the newly supported SQL92 join syntax
Register your book | Submit Errata | Examples
Browse within this book
Cover | Table of Contents | Index | Sample Chapter | Colophon
Book details
First Edition: April 2002
ISBN: 0-596-00129-0
Pages: 336
Average Customer Reviews: ![]()
![]()
![]()
![]()
(Based on 6 Reviews)
Featured customer reviews
Mastering Oracle SQL Review, March 06 2003
Mastering Oracle SQL by Sanjay Mishra and Alan Beaulieu published by O'Reilly is a great book for exploring the intricacies of Oracle SQL and particularly version 9ias as it relates to the SQL92 standard. SQL is not a glamorous programming language, but the authors make it accessible without talking down to their intended audience or presenting examples that are too simplistic. Like all O'Reilly books, the material is well presented, the authors can program as well as write, and the book has a very consistent and pleasing look.
The first chapters are introductory and review material. There is a short section on the history of SQL along with a bit of theory regarding relational database management systems. This section covers the basic DML statements, the WHERE clause, joins, group functions, subqueries, date formatting and date manipulation. This is what I would define as the heart of SQL, and the tools that most SQL programmers use every day. The chapters follow a basic formula: the topic is presented using traditional Oracle SQL, and then presented again using the newer adherence to the ANSI SQL92 standard. The two methods are compared and contrasted.
The next section is about getting the best from SQL. Presented in these chapters are set operations, hierarchical queries, partitions, objects and collections. This section is more focused to the newer versions of the ORACLE RDBMS. Programmers still using the older versions will find fewer things they can actually use, but this section does a good job of taking the reader beyond what they have encountered in school or training classes.
I was surprised to see a chapter on PL/SQL, the procedural extension of SQL; a subject large enough for complete books, and a language with its own intricacies and gotchas. As the focus is on SQL this chapter shows how PL/SQL and SQL interact, rather than delving deeply into PL/SQL.
The chapter that interested me the most was 14: Best Practices. A constant challenge facing many SQL programmers is finding ways to write code that is faster. This chapter does a good job of explaining why certain SQL statements execute faster than others, resulting in large increases in efficiency.
Synopsis
This is a very good book for SQL users who use the latest versions of ORACLE products at work, and want to start out creating the best possible SQL code right away. The time spent reading this book is very rewarding, and can be applied immediately to business situations encountered every day.
Mastering Oracle SQL Review, January 27 2003
A very good read, packed with good examples. However, we need scripts to create the tables used in all those wonderful examples -- how else are we to practice what we've just learned? Those scripts should be made available online.
Mastering Oracle SQL Review, October 15 2002
I purchased Mastering Oracle SQL two weeks ago. Having worked with Oracle for the past six years, I found the book an excellent guide to reinforce my SQL knowledge. The book details various SQL functions etc. in detail and would highly recommend it to anyone presently working with Oracle SQL or entering the world of Oracle. Mastering Oracle SQL really gives you value for money. Unfortunately, unlike other books that I have purchased on Oracle, the scripts to create the tables which is useful to newcomers who want to practice code used in the book or sample code from the book is not available from the authors or the publishers web site. This is the only downside of the book.
Mastering Oracle SQL Review, August 22 2002
Excellent, excellent, excellent! For an experienced SQL programmer, a delight to read. Even a few ideas not easily found elsewhere, can make a difference. Emphasis on inline views alone worth the price of book.
Gently introduces terms like "anti-join" in a very practical context, making them uniquely understandable.
Lack of coverage of MERGE ("UPSERT") statement, new in 9i, deplorable; it is useful not just in data warehousing.
And here's a trick from me: to insert a record without error if it already exists,
INSERT ALL INTO tab
(
a ,
b
)
SELECT
'foo' ,
'bar'
FROM
dual
WHERE
( NOT EXISTS
(
SELECT
1
FROM
tab
WHERE
( a = 'foo' )
AND
( b = 'bar' )
)
)
;
Mastering Oracle SQL Review, July 25 2002
This is the best book for learning the SQL. It clears all the doubts that you have regarding the SQL queries and it can really be like a ready reference. Lots of examples make this book a very nice companion for the developers.
A Must Buy for all who are enthusiastic for learning good SQL concepts.
Mastering Oracle SQL Review, June 24 2002
Hi its a great book so far very helpful if your starting into oracle sql...
Media reviews
Like all O'Reilly books, the material is well presented, the authors can program as well as write, and the book has a very consistent and pleasing look...This is a very good book for SQL users who use the latest versions of ORACLE products at work, and want to start out creating the best possible SQL code right away. The time spent reading this book is very rewarding, and can be applied immediately to business situations encountered every day."
--Drew Garrity, Upstate New York Oracle Users Group, March 2004
"Sad to say, highly skilled and dedicated DBAs are tougher to recruit than neurosurgeons. And their time is precious--the three DBAs where I work support more than 50 production databases on a 7X24 basis, of which many are patient-care systems where a target of zero downtime is taken for granted--so it's not prudent or cost-effective to bother our DBAs with obvious or bone-headed SQL questions. Most of these databases run on Oracle and Unix or Linux for scaleability and reliability. When I send the DBAs some SQL to analyze and tune, I want to feel that I've already done everything I can within my limited abilities to spiff up that SQL myself. That's where a book like 'Mastering Oracle SQL' comes into the picture...There's still no substitute for getting the database structure right in the first place, for investing the time to understand the structure, for organizing the application properly, for using the SQL keywords and functions correctly, and of course for the hard lessons learned from practical experience in the front lines. And you always need a full set of core reference books like David Kreine's 'Oracle SQL,' Jonathan Gennick's 'Oracle SQL*Plus,' and Steven Feuerstein's 'Oracle PL/SQL Programming' at your fingertips. But make a space on your bookshelf for 'Mastering Oracle SQL' as well, and reach for it when you get that subconscious twinge that says 'Hey, there's got to be a better way to do what I'm trying to do here.'"
--Ray Duncan, ERCB, January 2003
"If you use Oracle SQL on a regular basis, and are looking for more power without turning to procedural SQL, greater understanding of what's possible with Oracle SQL, and overall greater mastery of the language, then this book definitely deserves a place in your library. The book aims to fill the gap between the sometimes spotty vendor documentation, and other non-vendor-specific books on SQL that just don't explore the full depths of what is possible with Oracle-specific SQL. 'Mastering Oracle SQL' certainly hits this mark, and proves to be a very valuable resource for getting the most out of Oracle's breed of SQL...'Mastering Oracle SQL' passes the practicality and timeliness rating with flying colors. I've already been able to use several tricks I've learned from the book to great advantage in my daily work. In conclusion, if you want to get beyond the simple examples in most books covering SQL, and get a better picture than what the references and the Oracle documentation itself have to offer, 'Mastering Oracle SQL' will be an invaluable tool in your hands. Overall rating: 9/10 "
--Dan Hanks, http://plug.org, September 2002

