Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your email address or mobile phone number.

SQL Cookbook (Cookbooks (O'Reilly)) 1st Edition

4.6 out of 5 stars 82 customer reviews
ISBN-13: 978-0596009762
ISBN-10: 0596009763
Why is ISBN important?
This bar-code number lets you verify that you're getting exactly the right version or edition of a book. The 13-digit and 10-digit formats both work.
Scan an ISBN with your phone
Use the Amazon App to scan ISBNs and compare prices.
Sell yours for a Gift Card
We'll buy it for $1.43
Learn More
Trade in now
Have one to sell? Sell on Amazon
Rent On clicking this link, a new layer will be open
$16.20 On clicking this link, a new layer will be open
Buy used On clicking this link, a new layer will be open
$18.70 On clicking this link, a new layer will be open
Buy new On clicking this link, a new layer will be open
$23.57 On clicking this link, a new layer will be open
More Buying Choices
43 New from $20.80 32 Used from $9.99 1 Collectible from $28.97
Free Two-Day Shipping for College Students with Amazon Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student

Save Up to 90% on Textbooks Textbooks
$23.57 FREE Shipping on orders over $35. In Stock. Ships from and sold by Amazon.com. Gift-wrap available.

Frequently Bought Together

  • SQL Cookbook (Cookbooks (O'Reilly))
  • +
  • Learning SQL
  • +
  • SQL Pocket Guide
Total price: $59.78
Buy the selected items together

Editorial Reviews

Book Description

Query Solutions and Techniques for Database Developers

About the Author

Anthony Molinaro is a SQL developer and database administrator with many years experience in helping developers improve their SQL queries. SQL is particular passion of Anthony's, and he's become known as the go-to guy among his clients when it comes to solving difficult SQL query problems. He's well-read, understands relational theory well, and has nine years of hands-on experience solving tough, SQL problems. Anthony is particularly well-acquainted with new and powerful SQL features such as the windowing function syntax that was added to the most recent SQL standard.


Like this book? Find similar titles in the O'Reilly Bookstore.

Product Details

  • Series: Cookbooks (O'Reilly)
  • Paperback: 636 pages
  • Publisher: O'Reilly Media; 1 edition (December 26, 2005)
  • Language: English
  • ISBN-10: 0596009763
  • ISBN-13: 978-0596009762
  • Product Dimensions: 7 x 1.4 x 9.2 inches
  • Shipping Weight: 2.3 pounds (View shipping rates and policies)
  • Average Customer Review: 4.6 out of 5 stars  See all reviews (82 customer reviews)
  • Amazon Best Sellers Rank: #22,556 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

Top Customer Reviews

Format: Paperback
It doesn't take long to learn the basics of SQL. Once you start to do multi-table joins and you get to sub-selects and outer joins you can almost convince yourself you are an expert. Trust me. You aren't. I've read at least ten books on using SQL. This is the first one to blow my horizons away and open a completely new landscape.

The "recipies" are well explained and almost entirely practical and useful. This book showed me dozens of things I did not ever think of using SQL for, even though I have the BNF for SQL pretty much in my head after more than 18 years of being a practicing programmer.

Before this book I used to recommend "generic" SQL books to students and newbies because such books apply to virtually all SQL databases and it can be harmful for one to use a specific "dialect" (such as Oracle or SQL Server) that won't port to other SQL databases. I would urge people to learn "generic" SQL. You can always add the features of you specific dialect, but it is hard to give up features you assume will be in all dialects.

This book neatly avoids that problem by providing dialect-specific sections when you can or must code differently for a particular database. Even better, they explain the differences and the pros and cons of those differences. So this book can even be an aid to selecting the "right" database for your application.

I happen to be a fan of Open Source and Free Software and I'm pleased to say that this book covers both MySQL and PostgreSQL. Naturally it provides the "big three" of Oracle, Microsoft SQL Server, and IBM's DB2.

This book really opened my eyes to possibilities in SQL that I really didn't know existed in spite of the fact that I have been using the language (apparently without mastering it) for almost two decades.
Read more ›
Comment 58 of 58 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback
This book is just fantastic. One really needs to read the inside cover pages to see what this book doesn't try to do. The relevant elements are:

Non-political (on several SQL-specific fronts)

Non-Pure ANSI (portability versus vendor-specific features)

Non-platform (I couldn't find a mention of a particular platform)

Basically, the book focuses on how to accomplish numerous SQL tasks using SQL and those features found on some of the top RDBMS vendors' products. It is selective in that the focus is constrained to MS SQL (platform obvious, but not mentioned that I could find) Server, DB2, MySQL, PostgresSQL and Oracle. I think that this well represents at least the 80/20 rule of who's running what RDBMS.

The book is a set of recipes for (usually) each of these platforms. Each recipe is a code-demonstrated "how-to" for accomplishing the given task. This is perfect for those who don't want to become DBAs and focus on learning "too" much about SQL, rather, want to use an example in their code to make it do the right thing.

The book is very well written and finished. It is a joy to read.

The one detraction that I can think of is that it would be nice to see all of the examples online at O'Reilly's web site so that we could "play around with them" somewhat without having to enter the database table contents and all of the SQL by hand. It "ain't that hard," but who's got the time to do it? I think that having the code available with the book would make it an excellent training tool for newcomers to SQL and those switching to a different product such as going from Oracle or MS SQL to MySQL or PostgresSQL. However, as it is, the book is a 4.5 stars product. If you're interested solely in MySQL, check out the MySQL Cookbook from O'Reilly.
1 Comment 69 of 71 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback
Ultimately, the goal of this book is to give you a glimpse of what can be done using SQL outside of what is considered the typical SQL problem domain. This text is unique in that the target audience is wide, incorporating all levels of SQL programmers as well as those who are completely unfamiliar with SQL.

Both complex and simple solutions are provided, and solutions for five different vendors are available when a common solution does not exist. These five databases are DB2 v.8, Oracle Database 10g (with the exception of a handful of recipes, the solutions will work for Oracle8i Database and Oracle9i Database as well), PostgreSQL 8, SQL Server 2005 and MySQL 5. All of the examples are built around a small set of tables containing employee data. This helps the reader get familiar with the example data, so that, having become familiar with the data, you can focus on the technique that each recipe illustrates.

Chapter 1, Retrieving Records, introduces very simple queries. Examples include how to use a WHERE clause to restrict rows from your result set, providing aliases for columns in your result set, using an inline view to reference aliased columns, using simple conditional logic, limiting the number of rows returned by a query, returning random records, and finding NULL values. Most of the examples are very simple, but some of them appear in later more complex recipes, so it's a good idea to read this chapter if you're relatively new to SQL or aren't familiar with any of the examples listed for this chapter.

Chapter 2, Sorting Query Results, introduces recipes for sorting query results. The ORDER BY clause is introduced and is used to sort query results.
Read more ›
2 Comments 56 of 57 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse

Most Recent Customer Reviews

Set up an Amazon Giveaway

Amazon Giveaway allows you to run promotional giveaways in order to create buzz, reward your audience, and attract new followers and customers. Learn more
SQL Cookbook (Cookbooks (O'Reilly))
This item: SQL Cookbook (Cookbooks (O'Reilly))
Price: $23.57
Ships from and sold by Amazon.com

Want to discover more products? Check out these pages to see more: mysql data warehousing, free book sql server, sql in books, sql o'reilly