Updated for the latest database management systems -- including MySQL 6.0, Oracle 11g, and Microsoft's SQL Server 2008 -- this introductory guide will get you up and running with SQL quickly. Whether you need to write database applications, perform administrative tasks, or generate reports, Learning SQL, Second Edition, will help you easily master all the SQL fundamentals.

Each chapter presents a self-contained lesson on a key SQL concept or technique, with numerous illustrations and annotated examples. Exercises at the end of each chapter let you practice the skills you learn. With this book, you will:

Move quickly through SQL basics and learn several advanced features

Use SQL data statements to generate, manipulate, and retrieve data

Create database objects, such as tables, indexes, and constraints, using SQL schema statements

Learn how data sets interact with queries, and understand the importance of subqueries

Convert and manipulate data with SQL's built-in functions, and use conditional logic in data statements

Knowledge of SQL is a must for interacting with data. With Learning SQL, you'll quickly learn how to put the power and flexibility of this language to work.

Alan Beaulieu

Alan Beaulieu has been designing, building, and implementing custom database applications for over 13 years. He currently runs his own consulting company that specializes in designing Oracle databases and supporting services in the fields of Financial Services and Telecommunications. In building large databases for both OLTP and OLAP environments, Alan utilizes such Oracle features as Parallel Query, Partitioning, and Parallel Server. Alan has a Bachelor of Science degree in Operations Research from the Cornell University School of Engineering. He lives in Massachusetts with his wife and two daughters and can be reached at albeau_mosql@yahoo.com.

The animal on the cover of Learning SQL, Second Edition, is an Andean marsupial tree frog (Gastrotheca riobambae). As its name suggests, this crepuscular and nocturnal frog is native to the western slopes of the Andes mountains and is widely distributed from the Riobamba basin to Ibarra in the north.

During courtship, the male calls ("wraaack-ack-ack") to attract a female. If a gravid female is attracted to him, he climbs onto her back and performs a common frog mating hold called the nuptial amplexus. As the eggs emerge from the female's cloaca, the male catches the eggs with his feet and fertilizes them while maneuvering them into a pouch on the female's back. A female may incubate an average of 130 eggs, and development in the pouch lasts between 60 and 120 days. During incubation, swelling becomes visible, and lumps appear beneath the skin on the female's back. When the tadpoles emerge from the pouch, the female tree frog deposits them into the water. Within two or three months the tadpoles metamorphose into froglets, and at seven months they are ready to mate ("wraaaack-ack-ack").Both the male and female tree frog have expanded digital discs on their fingers and toes that help them climb vertical surfaces such as trees. Adult males reach 2 inches in length, while females reach 2.5 inches. Sometimes they are green, sometimes brown, and sometimes a combination of green and brown. The color of the juveniles may change from brown to green as they grow.

I have to admit that this I am not the target reader of this book, and my impression is naturally biased by this fact.

This book seems to be written for someone who has trouble understanding a casual phrase like "Let's store the data in the database". It feels to me like the author has written the book for someone who has never heard the word "data" or the word "database" before.

Admittedly there is correct information in the book on SQL syntax. But this correct information is incredible diluted in lengthy texts describing the most basic concepts.

As I have learnt SQL by working with it, my knowledge is about the parts of SQL that I have used. There are parts of the SQL language that I have not worked with, and that feel unfamiliar to me. I bought this book to learn the parts of the SQL syntax that I have not worked with. This was the wrong book for that purpose.

A lot of useful information with regards to basic select statements through to more complex subqueries and joins.

Although I would have liked to have seen more about PL SQL. Yet this book is about base SQL. The examples are based off of MySQL. So I am not to surprised that Oracle's PL/SQL wasn't a topic of heavy discussion.

One other note, the code did not work for me.I read this months ago, so I don't remember what error(s) I ran into when attempting to create the example database. I see from the other reviews found here, that others have had this same issue. I wish the author would look into and resolve this. The faulty code makes it harder for folks to read this and learn SQL hands on. *If it wasn't for this, I would have given the title a four star review.

I'm studying to become more proficient with databases and sql. I bought this book to get a start in a new career while working with Access 2010 and MySQL. So far so good. All codes work fine in my current environment which is XAMPP and Windows.

This book might be good but I can't tell. The book requires MySQL Server 6.0 to do the tutorials, which is not available. Subsequently, I can't do the tutorials. I checked MySQL download site and there is: MySQL Enterprise, Cluster CGE, Community Server, Cluster and so on listed on the download page. It would be helpful if the Author/Publisher listed the specific version of MySQL that can be used with the tutorials and the detailed instructions on how to load on your computer. Without this information, the book is not useful.

I think this book might be good. The book is based on Mysql 6.0 which is no longer available for download. Difficulties in figuring out what products under the MYSQL download site would be appropriate for use with this book. The Support and supposed Web Page that supports this book are non-existent. I think if I could actually get a clean supported mysql download that was compatible with the book that the book would be a good way to learn the basic of SQL. So far this has been a waste of money since I can't actually follow along with the book and examples.

Bottom LineNo, I would not recommend this to a friend

Merchant response: Thank you for reviewing Learning SQL, 2nd Edition, and I'm sorry for the frustration.

The author apparently used a pre-release version of MySQL 6.0 when writing the book, but then that version was pulled back from release by the developer. I'm told that the current version of MySQL will work fine with the book and with the example code supplied for the book.

You can find the current version at http://dev.mysql.com/downloads/mysql/. You can download the files for this book at http://examples.oreilly.com/9780596520847/.

If you ever have any questions or issues with the content of a title, you can contact our Book Tech staff at booktech@oreilly.com.

First of all - I am not a programmer. My background is business - and my last exposure to programming was BASIC!I do have a strong working knowledge of DB - 5 years as an end user. This book trained me to do my own SQL queries while doing technical support and QA.

I was looking for a book I could recommend to a business friend, whom wanted to learn Database Query Language for his small business. I bought the book and reviewed its syllabus and appropriateness to an intelligent audience, not necessarily as technical as I am with databases. I found the book to be excellently written, and in grammer, syntax, and outline as presentable a book to the 'general' audience as one could hope for. I have spent several weeks with the book. I recommend this book to be the first purchase by anyone who desires to learn to write in SQL.