Our Ironclad Guarantee
You must be satisfied. Try our print books for 30 days or our eBooks for 14 days. If they aren't the best you've ever used, you can return the books or cancel the eBooks for a prompt refund. No questions asked!
The more things change, the more they remain the same. Even with dramatic changes in technology such as the rise of cloud computing and AI, Oracle Database remains a dominant database, especially for mission-critical enterprise systems.
The third edition of this book works better than ever for learning how to use SQL and PL/SQL to work with an Oracle database. We’ve carefully checked and updated every example to follow modern best practices, and we’ve streamlined this book to focus on the most essential skills. Whether you’re a beginner with no coding experience or an experienced application developer who needs to learn how to use SQL and PL/SQL, you’ll appreciate the easy-to-understand explanations, clear examples, and step-by-step instructions.
Go to our instructor's site to learn more about this book and its instructor's materials.
This book is worth its cost just for its detailed and complete description of the SQL SELECT statement. The book takes 4 chapters (129 pages) to cover all aspects of it. I have not found any other book, including Oracle’s own documentation, which more completely describes how to use the SELECT statement."
This section presents the concepts and terms for working with any database. Then, it shows how to use SQL Developer to work with an Oracle database.
This section presents the essential SQL skills for retrieving data from a database and for adding, updating, and deleting that data. These skills move from the simple to the complex so you won’t have any trouble if you’re new to coding. But these skills are also sure to raise your expertise even if you’re already an experienced programmer.
This section shows how to design a database and how to implement that design by using SQL statements to create a database. In addition, it shows how to create views and manage database security. Finally, it shows how to host an Oracle database in the cloud. This can make your database more affordable, flexible, and scalable.
This section shows how to use Oracle’s procedural language, PL/SQL, to create stored procedures, functions, and triggers. In addition, it shows how to manage transactions and locking. This is a powerful set of PL/SQL skills.
This book is for anyone who wants to learn how to work with an Oracle database, regardless of prior programming experience. This includes…
Here are three features that will help you learn faster and better.
This book starts by showing how to query an existing database rather than showing how to create a new database. Why?
First, it’s motivating to see results right away, and querying can provide immediate results with just a single line of code. Second, querying an existing database helps you gain insight into the decisions that have to be made when designing a database. As a result, learning how to query a database first makes it easier to learn how to design a database later.
To work with an Oracle database, this book shows how to use SQL Developer, an intuitive graphical user interface that also provides many powerful features. This makes learning easier than using SQL*Plus, a command-line interface that has a steeper learning curve.
This book contains hundreds of example SQL statements that range from the simple to the complex, and every one of them is included in the download for this book. That way, your students can quickly get the idea of how a feature works from the simple examples and also see how the feature works in the real world from the complex ones.
This software is available for free, and appendixes A (Windows) and B (macOS) show how to install it.
"If you use Oracle as a backend database to your VB, C#, or ASP.NET database applications, then Murach’s Oracle SQL and PL/SQL should be the next addition to your developer library."
- Jeff Manley, a1vbcode.com
"This book is worth its cost just for its detailed and complete description of the SQL SELECT statement. The book takes 4 chapters (129 pages) to cover all aspects of it. I have not found any other book, including Oracle’s own documentation, which more completely describes how to use the SELECT statement."
- Eric Mortensen, North East Ohio Oracle Users Group
"A lifesaver! Got stuck on one of my Oracle 9i assignments and it took just one look in this book and I was all set and ready to take on other assignments. It is really a reliable reference book."
- Posted at an online bookseller
"Although I am primarily a SQL Server programmer, this book explained many of the ‘Oracle’ ways to do the stuff I already do with SQL Server in a manner that I could understand and relate to. I found lots of examples of stuff that I was struggling with in entering into my first large, full-scale Oracle programming projects. It is open daily when I work on Oracle code now."
- Posted at an online bookseller
"Murach books have a reputation for accessibility to the novice user. Murach’s Oracle SQL and PL/SQL is just as accessible to the novice, but also contains plenty to assist other Oracle users.... The result is a book that is great for Oracle novices, but also great for casual intermediate users like myself."
- David O’Meara, JavaRanch.com
"I bought this book to take my SQL skills up a notch or more. This book really does that. It moves from the basics to advanced queries. The advanced queries are very well explained and you get useful skills and understand how to extend this to other queries."
- Posted at an online bookseller
“This book is a must-have for programmers looking to get into data management. It is clear and simple and the examples are easy to understand. All programmers that deal with databases should have this book in their library.”
- Posted at an online bookseller
“Loved the layout. Not long winded; just the facts. The page on the left gives a more indepth explanation. The page on the right gives you the nitty-gritty of what you need to know. I highly recommend the book and will look for Murach's books in the future.”
- Posted at an online bookseller
View the table of contents for this book in a PDF: Table of Contents (PDF)
Click on any chapter title to display or hide its content.
The hardware components of a client/server system
The software components of a client/server system
Other client/server architectures
How a database table is organized
How tables are related
How columns in a table are defined
A brief history of SQL
A comparison of four relational databases
An introduction to SQL statements
Typical SQL statements
SQL coding guidelines
How to code comments
How to create a database connection
How to navigate through the database objects
How to view the column definitions and data for a table
How to enter and run a SQL statement
How to handle syntax errors
How to open and save SQL scripts
How to code and run SQL scripts
How to interpret syntax in this book
The basic syntax of the SELECT statement
SELECT statement examples
How to code column specifications
How to name the columns in a result set
How to code string expressions
How to code arithmetic expressions
How to use scalar functions
How to use DISTINCT to eliminate duplicate rows
How to use the comparison operators
How to use the AND, OR, and NOT logical operators
How to use the IN phrase
How to use the BETWEEN phrase
How to use the LIKE operator
How to use the REGEXP_LIKE function
How to use the IS NULL condition
How to sort by a column name
How to sort by an alias, an expression, or a column number
How to use the row limiting clause
How to test expressions
How to code an inner join
When and how to use table aliases
How to use compound join conditions
How to use a self-join
How to join more than two tables
How to use the implicit inner join syntax
How to code an outer join
Outer join examples
Outer joins that join more than two tables
How to use the implicit outer join syntax
How to combine inner and outer joins
How to join tables with the USING keyword
How to join tables with the NATURAL keyword
How to use cross joins
The syntax of a union
Unions that combine data from different tables
Unions that combine data from the same table
How to use the MINUS and INTERSECT operators
How to code aggregate functions
Queries that use aggregate functions
How to code the GROUP BY and HAVING clauses
Queries that use the GROUP BY and HAVING clauses
How the HAVING clause compares to the WHERE clause
How to code complex search conditions
How to use ROLLUP
How to use CUBE
How analytic functions work
How to code frames
Two more examples of frames
How to use named windows
How to use the ranking functions
How to use subqueries
How subqueries compare to joins
How to use subqueries with the IN operator
How to compare a subquery with an expression
How to use the ALL keyword
How to use the ANY and SOME keywords
How to code correlated subqueries
How to use the EXISTS operator
How to code subqueries in the FROM clause
How to code subqueries in the SELECT clause
A complex query that uses subqueries
A procedure for building complex queries
How to use the WITH clause
How to code a recursive query
How to use the hierarchical query clause
How to re-create the tables for this book
How to create a table from a SELECT statement
How to insert a single row
How to insert default values and null values
How to use a subquery to insert multiple rows
How to update rows
How to use a subquery in an UPDATE statement
How to delete rows
How to use a subquery in a DELETE statement
The character data types
How to use character functions
How to parse a string
The numeric data types
Common number format elements
How to use numeric functions
How to search for floating-point numbers
The temporal data types
Common datetime format elements
How to use datetime functions
How to perform a date search
Common timestamp and interval formats
How to use timestamp functions
How to use interval functions
How to use the EXTRACT function
How to convert characters, numbers, and dates
How to sort strings in numerical sequence
How to perform a time search
How to convert characters to and from their numeric codes
How to use the CASE expression
How to use the COALESCE, NVL, and NVL2 functions
How to use the GROUPING function
The basic steps for designing a data structure
How to identify the data elements
How to subdivide the data elements
How to identify the tables and assign columns
How to identify the primary and foreign keys
How to enforce the relationships between tables
How normalization works
How to identify the columns to be indexed
The seven normal forms
How to apply the first normal form
How to apply the second normal form
How to apply the third normal form
When and how to denormalize a data structure
An introduction to CDBs and PDBs
How to create and drop a pluggable database
How to create a table
How to code a primary key constraint
How to code a foreign key constraint
How to code a check constraint
How to alter the columns of a table
How to alter the constraints of a table
How to rename, truncate, and drop a table
How to create an index
How to drop an index
How to create a sequence
How to use a sequence
How to alter a sequence
How to drop a sequence
An introduction to scripts
How the DDL statements work
How to work with tables, indexes, and sequences
How to display an EER diagram for a table
How views work
Benefits of using views
How to create a view
How to create an updatable view
How to create a read-only view
How to use WITH CHECK OPTION
How to insert or delete rows through a view
How to alter or drop a view
How to create a user
How to create an admin user
How to alter and drop a user
How to create and drop a role
System privileges and object privileges
How to grant privileges
How to revoke privileges
How to work with synonyms
A script that creates roles and users
How to view the privileges for users and roles
How to create an admin connection for a PDB
How to work with users
How to grant and revoke roles
How to grant and revoke system privileges
The Oracle Cloud portal
How to create a database in the cloud
How to create a user for a schema
How to create the tables for a schema
How to view the database objects for a schema
How to connect to a cloud database
How to run SQL against a cloud database
How to restore and delete a cloud database
How to restart a cloud database
An anonymous PL/SQL block in a script
Statements for working with PL/SQL and scripts
How to print data to an output window
How to declare and use variables
How to code IF statements
How to code CASE statements
How to code loops
How to use a cursor
How to use collections
How to use records
How to handle exceptions
Predefined exceptions
How to drop database objects without displaying errors
How to commit and roll back transactions
How to work with save points
How concurrency and locking are related
How to set the transaction isolation level
Best practices for concurrency
How to create a stored procedure
How to call a stored procedure
How to code input and output parameters
How to code optional parameters
How to raise a predefined exception
How to raise a user-defined exception
A stored procedure that inserts a row
How to drop a stored procedure
How to create and call a function
A function that uses multiple RETURN statements
How to drop a function
How to create a package
How to drop a package
How to view and drop procedures, functions, and packages
How to edit and compile procedures and functions
How to grant and revoke privileges
How to debug procedures and functions
How to create a trigger for a table
A trigger that enforces data consistency
How to use conditional predicates
How to create a trigger for a view
How to create a system trigger
How to enable, disable, rename, or drop a trigger
How to create a compound trigger
A trigger that causes the mutating-table error
How to solve the mutating-table problem
How to view, enable, disable, rename, or drop a trigger
How to edit a trigger
How to install Oracle Database XE
How to install Oracle SQL Developer
How to download the files for this book
How to connect as the sysdba user
How to create the schemas for this book
How to import connections for the schemas
How to make sure your system is set up correctly
How to stop and start the database service
How to download the files for this book
How to install Oracle SQL Developer
How to set up the database for this book
How to create the connections for this book
How to make sure your system is set up correctly
This download includes:
Not sure whether this is the book for you? Download a free PDF for a sample chapter and see for yourself how easy learning Oracle SQL and PL/SQL can be.
This appendix shows how to set up a Windows computer for this book, including instructions for installing Oracle Database XE and SQL Developer. When you’re done, you’ll be able to work through the examples and exercises presented in this book.
Download Now
This appendix shows how to set up a macOS computer for this book, including instructions for setting up the Oracle Cloud Autonomous Database service and installing SQL Developer. When you’re done, you’ll be able to work through the examples and exercises presented in this book.
Download Now
This chapter shows you how to use the most important SQL statement, the SELECT statement, to retrieve data from a single table.
Download Now
We’ll be posting answers to the frequently asked questions (FAQs) for this book here. So if you have any questions, please email us. Thanks!
There are no book corrections that we know of at this time. But if you find any errors in this book, please email us so we can post the corrections here. Thank you!
For orders and customer service:
1-800-221-5528
Weekdays, 8 to 4 Pacific Time
If you're a college instructor who would like to consider a book for a course, please visit our website for instructors to learn how to get a complimentary review copy and the full set of instructional materials.