Book description
The vast majority of Oracle SQL books discuss some syntax, provide the barest rudiments of using Oracle SQL, and perhaps include a few simple examples. It might be enough to pass a survey course, or give you some buzz words to drop in conversation with real Oracle DBAs. But if you use Oracle SQL on a regular basis, you want much more. You want to access the full power of SQL to write queries in an Oracle environment. You want a solid understanding of what's possible with Oracle SQL, creative techniques for writing effective and accurate queries, and the practical, hands-on information that leads to true mastery of the language. Simply put, you want useful, expert best practices that can be put to work immediately, not just non-vendor specific overview or theory.Updated to cover the latest version of Oracle, Oracle 10g, this edition of the highly regarded Mastering Oracle SQL has a stronger focus on technique and on Oracle's implementation of SQL than any other book on the market. It covers Oracle s vast library of built-in functions, the full range of Oracle SQL query-writing features, regular expression support, new aggregate and analytic functions, subqueries in the SELECT and WITH clauses, multiset union operators, enhanced support for hierarchical queries: leaf and loop detection, and the CONNECT_BY_ROOT operator, new partitioning methods (some introduced in Oracle9i Release 2), and the native XML datatype, XMLType.Mastering Oracle SQL, 2nd Edition fills the gap between the sometimes spotty vendor documentation, and other books on SQL that just don't explore the full depth of what is possible with Oracle-specific SQL. For those who want to harness the untapped (and often overlooked) power of Oracle SQL, this essential guide for putting Oracle SQL to work will prove invaluable.
Table of contents
- A Note Regarding Supplemental Files
- Preface
- 1. Introduction to SQL
- 2. The WHERE Clause
- 3. Joins
-
4. Group Operations
- 4.1. Aggregate Functions
-
4.2. The GROUP BY Clause
-
4.2.1. Correspondence Between SELECT and GROUP BY
- 4.2.1.1. Aggregate expressions generally require a GROUP BY clause
- 4.2.1.2. GROUP BY clause must include all nonaggregate expressions
- 4.2.1.3. Aggregate functions not allowed in GROUP BY clause
- 4.2.1.4. Constants can be omitted from the GROUP BY clause
- 4.2.1.5. Scalar functions may be grouped by their underlying column
- 4.2.1.6. Concatenated columns may be grouped in either of two ways
- 4.2.1.7. You can sometimes exclude a nonaggregate expression from the GROUP BY clause
- 4.2.1.8. You are not required to show your GROUP BY columns
- 4.2.2. GROUP BY Clause and NULL Values
- 4.2.3. GROUP BY Clause with WHERE Clause
-
4.2.1. Correspondence Between SELECT and GROUP BY
- 4.3. The HAVING Clause
- 4.4. Nested Group Operations
- 5. Subqueries
-
6. Handling Temporal Data
- 6.1. Time Zones
- 6.2. Temporal Data Types in Oracle
- 6.3. Literals of Temporal Types
- 6.4. Getting Temporal Data In and Out of a Database
- 6.5. Date and Time Formats
-
6.6. Manipulating Temporal Data
- 6.6.1. Using the Built-in Temporal Functions
- 6.6.2. Addition
-
6.6.3. Subtraction
- 6.6.3.1. Subtracting one DATE from another
- 6.6.3.2. Subtracting one TIMESTAMP from another
- 6.6.3.3. Subtracting a number from a DATE
- 6.6.3.4. Subtracting months from a DATE
- 6.6.3.5. Number of months between two DATEs
- 6.6.3.6. Time interval between two DATEs
- 6.6.3.7. Subtracting an INTERVAL from a DATE or TIMESTAMP
- 6.6.4. Determining the First Day of the Month
- 6.6.5. Rounding and Truncating Dates
- 6.6.6. SELECTing Data Based on Date Ranges
- 6.6.7. Creating a Date Pivot Table
- 6.6.8. Summarizing by a Date/Time Element
- 7. Set Operations
-
8. Hierarchical Queries
- 8.1. Representing Hierarchical Information
- 8.2. Simple Hierarchy Operations
- 8.3. Oracle SQL Extensions
-
8.4. Complex Hierarchy Operations
- 8.4.1. Finding the Number of Levels
- 8.4.2. Listing Records in Hierarchical Order
- 8.4.3. Checking for Ascendancy
- 8.4.4. Deleting a Subtree
- 8.4.5. Listing Multiple Root Nodes
- 8.4.6. Listing the Top Few Levels of a Hierarchy
- 8.4.7. Aggregating a Hierarchy
- 8.4.8. Ordering Hierarchical Data
- 8.4.9. Finding the Path to a Node
- 8.5. Restrictions on Hierarchical Queries
- 8.6. Enhancements in Oracle Database 10g
- 9. DECODE and CASE
- 10. Partitioning
- 11. PL/SQL
- 12. Objects and Collections
- 13. Advanced Group Operations
- 14. Advanced Analytic SQL
- 15. SQL Best Practices
- 16. XML
- 17. Regular Expressions
- 18. Model Queries
- A. Oracle’s Old Join Syntax
- About the Authors
- Colophon
- Copyright
Product information
- Title: Mastering Oracle SQL, 2nd Edition
- Author(s):
- Release date: June 2004
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596006327
You might also like
book
Mastering Oracle SQL
If you write programs to run against an Oracle database, you spend a lot of time …
book
Beginning Oracle SQL: for Oracle Database 12c, Third Edition
Beginning Oracle SQL is your introduction to the interactive query tools and specific dialect of SQL …
book
Oracle SQL Tuning with Oracle SQLTXPLAIN: Oracle Database 12c Edition, Second Edition
Learn through this practical guide to SQL tuning how Oracle's own experts do it, using a …
book
Pro Oracle SQL, Second Edition
Pro Oracle SQL, Second Edition unlocks the power of SQL in the Oracle database—one of the …