ŷ

Jump to ratings and reviews
Rate this book

Learning SQL

Rate this book
SQL (Structured Query Language) is a standard programming language for generating, manipulating, and retrieving information from a relational database. If you're working with a relational database--whether you're writing applications, performing administrative tasks, or generating reports--you need to know how to interact with your data. Even if you are using a tool that generates SQL for you, such as a reporting tool, there may still be cases where you need to bypass the automatic generation feature and write your own SQL statements. To help you attain this fundamental SQL knowledge, look to Learning SQL , an introductory guide to SQL, designed primarily for developers just cutting their teeth on the language. Learning SQL moves you quickly through the basics and then on to some of the more commonly used advanced features. Among the topics discussed: Best of all, Learning SQL talks to you in a real-world manner, discussing various platform differences that you're likely to encounter and offering a series of chapter exercises that walk you through the learning process. Whenever possible, the book sticks to the features included in the ANSI SQL standards. This means you'll be able to apply what you learn to any of several different databases; the book covers MySQL, Microsoft SQL Server, and Oracle Database, but the features and syntax should apply just as well (perhaps with some tweaking) to IBM DB2, Sybase Adaptive Server, and PostgreSQL. Put the power and flexibility of SQL to work. With Learning SQL you can master this important skill and know that the SQL statements you write are indeed correct.

312 pages, Paperback

First published January 1, 2005

292 people are currently reading
1,161 people want to read

About the author

Alan Beaulieu

17books5followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
217 (29%)
4 stars
326 (43%)
3 stars
163 (21%)
2 stars
27 (3%)
1 star
9 (1%)
Displaying 1 - 30 of 62 reviews
Profile Image for Martha.
21 reviews27 followers
October 10, 2016
Learning SQL is a fine introduction to SQL, with concise & practical practice exercises following each chapter. My only gripe is that even a beginner book should have at least one chapter on query optimization and performance tuning; it's a little too easy for beginners to knock over an entire database with one bad query. So if you do use this to learn SQL, do yourself (and your DBA) a favor and learn some basic optimization & tuning tricks for your own DBMS before you start to write and run queries in a production environment. (For query optimization, it's best to use a book specific to your RDBMS, as each has its own tricks and pitfalls. For MySQL, High Performance MySQL: Optimization, Backups, and Replication is terrific, and PostgreSQL 9.0 High Performance is very good for PostgreSQL.)
Profile Image for Rob.
20 reviews
August 10, 2012
At the time of reading this book SQL is new to me. I am familiar with a single command really (select * from [Table]). My work place uses MS SQL but I didn't want to just limit myself to Microsoft technology.

Learning SQL starts off nicely for new users of SQL, it uses MySQL to provide you the examples, but the author is clear at telling you when a command is different between MSSQL, MySQL and Oracle.

The whole history, and explanation of how relational databases came about and work the way they do is rightly skipped over. This is not something you need to worry about when starting out, but becomes more interesting to you once you know and use the product. So instead you get down and dirty with the real stuff you want to learn.

It's a great book for introducing you to SQL, allowing you to decide which route you might take for specialising in one of the big branded database servers. It sets a sound foundation for more advanced techniques and I would recommend it to anyone wanting to learn SQL for the first time.
Profile Image for Stephen.
Author7 books14 followers
February 26, 2024
An excellent overview/review of key SQL concepts. The text and examples are based on MySQL, though much of the information is based on Standard SQL, and the author calls out MS SQL and Oracle differences. There isn't a lot of mention of PostgresSQL, though what's based on the standard syntax is generally relevant there.

Most of the book covers basic concepts like queries and Joins, spending some time at the end on design issues (views, partitions, sharding, big data) and ending with a brief tour or NoSQL databases and tools for working with Big Data.

I got this to do a refresh on some database concepts that were a bit stale and it was perfect for that. It will probably serve you well if you have some basic understanding of database concepts and want to go a bit deeper.
30 reviews
July 21, 2013
I already knew SQL and was able to write queries with joins, where clauses, etc. I was also able to read and understand stored procedures and functions, but I wanted a refresher and was curious about what I didn't know/use. I also wanted to bring myself up to speed on improving the formats of my queries and use updated syntax (such as using 'inner join tbl b on a.c = b.c' rather than 'where a.c = b.c'). The chapters are short and the exercises do a good job of reinforcing the material covered in the chapter so you learn by doing. The book is a quick, easy read. It can be completed in 2 or 3 weeks if you do a chapter every night or every other night. I feel it was time well spent.
Profile Image for Aulon.
25 reviews1 follower
March 18, 2022
Great read! It pieced together a lot of concepts that I learned on the job, and it provided the theory I was missing. Comprehensive (but not detailed) guide.
Profile Image for Geoffrey.
61 reviews1 follower
September 19, 2024
Eh... I was looking for ideas and theories that would help me design my own apps. This was ok, but nothing really insightful. If you're coming to the SQL topic with some background experience, this book won't really be useful to you.
Profile Image for ZeV.
185 reviews21 followers
November 10, 2020
This is a fine book if you are looking for the first exposure to SQL. The author does a good job of introducing the basics of how the language works, touching all the essential features of SQL that you may encounter day-to-day.

As an introductory book, what could have been done better, in my opinion, is to provide pointers to learning resources for those who wish to delve deeper into each topic. The book covers a wide range of topics but rather superficially, so some more care in that regard would have made the book more valuable.

Given that the syntax variants for a couple of database engines (e.g., DB2, Oracle, SQL Server) are interleaved throughout the book, it is a little odd the book leaves out PostgreSQL almost entirely. Rather than interleaving, putting those as footnotes/endnotes may have made the book slightly easier to follow. (I read it on Safari Books Online in case that matters.)
Profile Image for Alex.
579 reviews43 followers
May 10, 2015
For my purposes, this was a fantastic book. I can understand that mileage may vary if you are a DBA or need to get into great depth on a specific database and the intricacies of its syntax, but as a general overview to relational databases and SQL, this is an excellent resource. If you work with software that has a database component, the information contained herein will help you to understand what kinds of things are more or less easily doable with your data. I found the book very pragmatic and the examples helpfully illustrative.
Profile Image for Aaron Albin.
7 reviews
July 11, 2021
Read the 3rd edition. Had a surface-level understanding of SQL going in and wanted a more structured walkthrough of the language, especially w.r.t. querying.

The treatment of querying was quite good. I'd only suggest more on query optimization (there's a couple of other advanced topics I felt could be replaced with this instead); or at least cover best practices / things to avoid.

Overall very readable and has a lot of breadth. Would recommend to fill in knowledge gaps or just want more structured learning on the topic.
Profile Image for caisah.
27 reviews
March 8, 2013
This book manages to easily expose the basic SQL concepts. After reading it you are ready to go and design your database or app.

Although it focuses on MySQL there are a lot of examples of MS SQL and Oracle SQL.

It is a beginner's book so it misses some advanced techniques such as optimization or high level design.
Profile Image for Louis.
226 reviews30 followers
October 5, 2007
Really good introduction. Not just the specifications and grammar, but examples on how to do things right and why they are right.
Profile Image for Cara.
291 reviews14 followers
October 30, 2010
A valuable resource for anyone new to SQL plus a handy reference for the more proficient.
Profile Image for Rob.
26 reviews1 follower
February 8, 2023
Well-structured overview of SQL and relational databases. I had limited practical experience with SQL before reading, so this book introduced me to some useful features, like set operations, views, and window functions. It also clarified some of the features I didn't properly understand, like indexes, the different join types, and concurrency control (transactions, isolation levels, read phenomena, locking and versioning).

The book uses MySQL for most examples while also mentioning Oracle and MS SQL differences, but almost completely ignores PostgreSQL. Luckily, PostgreSQL has great documentation, so I never ran into any trouble adjusting the examples and exercises (which I was running against a PostgreSQL docker container with the sakila data preloaded). In particular, the whole of chapter 7 is about various built-in functions related to strings, numbers, and dates, so it's not very useful if you're not using one of the three covered RDBMSs.

The exercises at the end of each chapter are fairly good at reviewing the concepts learned.

In hindsight, although this book is good, I'd recommend just reading through the excellent PostgreSQL documentation instead, which has both greater breadth and depth than this book.
Profile Image for Steven.
177 reviews
June 11, 2023
Feel like it’s diminishing returns with this book for several reasons :

1. First half of book is really solid if you have at least a little background in SQL or want a refresher. 2nd half of book just didn’t deliver what I was hoping for since there were certain exercises at the end of chapters I didn’t have the dataset to do problems against

2. Like other technology books, looking future forward in what SQL is going to look like is pretty dated. This book came out in 2020 (3rd edition) and some of the last two chapters just don’t seem relevant as much anymore

3. There were free resources that came with the book but something changed and now everything has gone to a paid subscription route to access resources. If I didn’t download the primary dataset for the end of chapter exercises when I got the book, I don’t know if I would have had access past mid 2022.

I got this book with the idea that it would be a refresher the first half and kind of help me move into more intermediate SQL the second half. The results are mixed and with so many other resources out there, I don’t know I would get this book as more as a reference book at this point.
Profile Image for Jeff.
2 reviews
February 4, 2023
I'm reading the 1st edition version so the comments I have on the book may already be changed.
The book is concise and had great examples.
It would be useful to have examples with large data sets for practice.
The book doesn't cover formatting and styles that are typical in industry.
Having information about how SQL integrates with the data pipeline would provide helpful perspective to beginners.
This book makes for good reference material and the chapters are well organnized.
Chapter 8 on Join should provide more visuals to the reader to better grasp how inner join, left join, right join works.
Profile Image for Jaabberwocky.
9 reviews
July 9, 2018
Great book, does what it says on the cover: teaches you the ins and outs of SQL. It is certainly structured well and the review questions at the end of the chapter are challenging enough to help reinforce concepts, but not too difficult that you feel like you are back in college. That said, he frequently introduces new concepts, and says "not to worry about it until later". This isn't good structuring as some, including myself, can't just "let things go" like that. That made me read the documentation, which I guess makes it good?
35 reviews
January 12, 2025
The latest version of this book seems to be missing from GR somehow.

Altogether a really great introduction to SQL for me. I literally learnt most of what I know about SQL from this book. Went from knowing nothing to using SQL on a regular basis.

If you really put in the time and patience into understanding the practice and concepts, using SQL and this book will be a great addition to your skillset.

Highly recommended.
Profile Image for Redowan Delowar.
46 reviews4 followers
March 24, 2020
I was reading Essential SqlAlchemy by Rick Copeland for learning ORM in Python and the author referred to this book to review the basics of SQL. It's a great introductory book to get you up and running with the crucial concepts of relational databases. If you are one of those developers like me who has been using SQL for quite some time without having any formal introduction, this book can be a great source to fill in the gaps.
Profile Image for Nickolai.
852 reviews8 followers
November 28, 2018
Отличная книга для первичного изучения языка SQL. Обладает логичной структурой, информация подается в доступной форме, приведены хорошие примеры. Рассчитана на MySQL, пользователям Oracle, PostgreSQL и других СУБД приходится самостоятельно искать отличающиеся команды.
Profile Image for Reinis Bekeris.
32 reviews1 follower
November 11, 2020
The examples used in the book were hard to comprehend as the author choses not to show previews of tables, which the queries are run on.
Still was a solid start to investigate what SQL can do and what are the principles used behind the most useful methods.
3 reviews11 followers
December 6, 2022
I've already took a module on SQL back in the days so I was reading this book just as a revision (since I don't use it in my job). It covered a great deal of concepts but I didn't really like the sequence, but that's just a personal preference.
Profile Image for PYTHON COURSE.
2 reviews
Read
December 20, 2022
Useful post Thanks for sharing it thats truly valuable knowledge about similar topic. Amazing. Have a more successful day. Amazing write-up always finds something interesting.
Profile Image for Prasetya Tegar Fitriaji.
5 reviews1 follower
September 13, 2023
this book is suitable for a beginner who wants to learn SQL Query. it's explaining all features for each basic queries and providing exercise as well. but the exercise may hard for a beginner because of full command line and less GUI.
73 reviews43 followers
June 11, 2017
This will make your first month of SQL a lot easier, but it's very much a book for beginners.
Displaying 1 - 30 of 62 reviews

Can't find what you're looking for?

Get help and learn more about the design.