Learning SQL
Publisher: O'Reilly Media
Final Release Date: August 2005
Pages: 312

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:

  • The history of the computerized database
  • SQL Data Statements--those used to create, manipulate, and retrieve data stored in your database; example statements include select, update, insert, and delete
  • SQL Schema Statements--those used to create database objects, such as tables, indexes, and constraints
  • How data sets can interact with queries
  • The importance of subqueries
  • Data conversion and manipulation via SQL's built-in functions
  • How conditional logic can be used in Data Statements
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.

Table of Contents
Product Details
About the Author
Recommended for You
Customer Reviews


by PowerReviews
oreillyLearning SQL

(based on 14 reviews)

Ratings Distribution

  • 5 Stars



  • 4 Stars



  • 3 Stars



  • 2 Stars



  • 1 Stars



Reviewed by 14 customers

Displaying reviews 1-10

Back to top

Previous | Next »


where to download the database

By Season

from San jose

Comments about oreilly Learning SQL:

I bought the book, but I can't find the link to download the database. Could anyone share the link?

(0 of 9 customers found this review helpful)


Bad choice at start = worthless

By T

from Grand Rapids, MI

About Me User

Verified Reviewer


  • No Pros


  • Fails At Start

Best Uses

  • Doorstop

Comments about oreilly Learning SQL:

NO, O'Reilly, 1 star doesn't mean "Not Good"; it means BAD ("1984" newspeak much?). Unless you feel comfortable digging around in hidden files on your computer, do not buy this book. I purchased this book from Amazon. By providing SQL code for table creation that only works in MySQL, the author precludes its use for people new to (i.e., Learning, like in the title?) SQL and who may be trying to learn SQL on another platform. The book examples may be agnostic, but if you can't even get started, it hardly matter. The instructions for installing MySQL are out-of-date. If there is a problem with the install, the author suggest just "uninstalling". Turns out, MySQL doesn't really uninstall itself and it is a non-trivial to get a true uninstall, and requires accessing hidden files in Windows that are hidden because the average user shouldn't be modifying them. In short, this book fails from the cover forward.

(6 of 6 customers found this review helpful)


Will take you from from zero to cruising speed with SQL

By Edmonton Linux Users Group

from Edmonton

Comments about oreilly Learning SQL:

This book should take you from zero to cruising speed with SQL in

a relatively short time. As the subtitle suggests, it's "A Pain-Free

Introduction to SQL..." and I agree. I haven't done database for several

years, and I found this book to be an excellent roadmap to both

re-learning and new learning.

Although the examples are all for MySQL 4.1.11 (Yeah! The database

I'll be using) on Windows (Ahem), differences in code are pointed out for

various other databases, notably Oracle and SQL Server. MySQL is just as

easy to install on Linux, so it was very easy to test examples and try the


The author makes no claim to get into anything indepth, or even

into everything, period. However, what is presented is more than enough to

get most people started and productive, and there are further resources

recommended, including books and websites. Since I'm converting an

existing application to use a database backend, I was able to note some

specific techniques that will apply, so I'm ready to use them when the

time comes.

Recommended, for both an introduction and a review.

http://elug.ca/reviews/learning_sql.shtml (http://elug.ca/reviews/learning_sql.shtml)

(3 of 4 customers found this review helpful)


Using the example

By jaggi bn

from Undisclosed

Comments about oreilly Learning SQL:

the review of johns2947 was very helpful. I was using \ while using windows but after the clue from the reviewer johns2947 i changed the command accordingly and it worked.


jaggi bn

(4 of 7 customers found this review helpful)


Failed to open file error

By johns2947

from Undisclosed

Comments about oreilly Learning SQL:

Check the name of your file. When you download it, it should be :


You can use that at is, without changing it to a .txt file

Make sure you opened the database first, as in the book instruction.

mysql> use bank;

then run source

(5 of 9 customers found this review helpful)


Using the example

By johns2947

from Undisclosed

Comments about oreilly Learning SQL:

The example does work (in Windows) if you follow the directions in the book.

The book tells you to login to mysql and then to create a database named 'bank'.

mysql> create database bank;

Then run the command

mysql> use bank;

Now you can run the source command for the example that you downloaded.

For example, I downloaded the example into my e: drive, so the source command reads:

mysql> source e:learningsqlexample.sql;

Notes: Windows XP does not require the "/" or "\" for the root directory (such as C: or E:), but will need the "\" if you go to a subdirectory.

What a pain learning this stuff from a book is! Reminds me of the frustration of teaching myself DOS 3.1 !

(0 of 2 customers found this review helpful)


Failed to open file error

By cj brown

from Undisclosed

Comments about oreilly Learning SQL:

Looks like the example needs to be compiled before I can use... I get this error.

-> source C:\Users\CJ\Desktop\LearningSQLExample_sql.txt;


Unknown command '\U'.

mysql: Character set 'JDesktopLearningSQLExample_sql.txt;' is not a compiled cha

racter set and is not specified in the 'C:\mysql\\share\charsets\Index.xml' file

Charset is not found

Any assistanve will be appreciated.



(0 of 2 customers found this review helpful)


Failed to open file error

By Anonymous

from Undisclosed

Comments about oreilly Learning SQL:

When I try to use the source command to populate my database, I get an error that says, "Failed to open file 'C:\file location', error: 2. What am I doing wrong?

(0 of 2 customers found this review helpful)


example section- is having a problem

By Anonymous

from Undisclosed

Comments about oreilly Learning SQL:

I can load the example just fine. The trick is that the example's file name does not match those in the book. So you just use the new name and it's gonna be fine.

(1 of 2 customers found this review helpful)


Great start

By Lance

from Undisclosed

Comments about oreilly Learning SQL:

I'm not finished working through this book yet but I am finding it very easy to follow with great examples.

I was not a complete beginner as I had a fairly firm grasp of basic queries but I chose this book to read cover to cover for a more structured learning curve and it's doing just that.

Displaying reviews 1-10

Back to top

Previous | Next »

Buy 2 Get 1 Free Free Shipping Guarantee
Buying Options
Immediate Access - Go Digital what's this?
Ebook:  $27.99
Formats:  DAISY, ePub, Mobi, PDF