Looking for the best SQL tutorial book

I need to learn SQL. I am very good at teaching myself using tutorials and am looking for opinions on the best one. Thanks.

I highly recommend Judith Bowman’s books, The Practical SQL Handbook and its companion, Practical SQL: The Sequel.

The first book is an excellent way to learn SQL. The second book is very useful for the professional programmer in that it is indexed by “what you want to do” and also includes guidelines for making queries more efficient.

Boy are you in luck, I just got through explaining this to someone a few minutes ago. I have only a small part of my collection at work and they are the ones that I consider the most valuable.

“The Practical SQL Handbook” is an easy read and focuses on real-life solutions to real problems. Very good for learning.

“SQL, the Complete Reference”. Huge but still pretty easy to read. Good reference book.

Any of the O’Reilly SQL books - a compromise between the two above. Very high quality and it is possible to learn straight from those as well.

Each of the above titlea can be found at major bookstores like Barnes & Noble.

It looks like we have an early cnsensus on “The Practical SQL Handbook”.

This is the worst pun I’ve ever seen in a technical book title. :smiley:

Ditto on the book, but here’s a way to get started before you get the book. Microsoft Access allows you to create queries by pointing and clicking, but it also has a choice on the top menu to “View SQL”. This allows you to look at and edit the SQL that you’ve created using the graphical interface. I achieved a basic working knowledge of SQL in this way.

That is true and it is the way that I learned the basics of SQL many years ago. However, the MS SQL syntax is horribly non-standard. I am not a usual MS basher but they did take the SQL standard and screwed with it until it was just different enough to look like a whole different thing altogether. You have to do some serious translation to get it to work in other databases.

if one really wants to go crazy, an individual call download a personal version of Oracle and other big-time RDMS’s that companies pay millions of dollars for free. Setting up your own database that way would teach you just about everything. It is a little extreme but some people do it.

IIRC, The Practical SQL Handbook comes with a CD-ROM that includes a personal version of Sybase’s “SQL Anywhere” DB server, and some sample databases.

It is better than that. My copy includes almost ALL of the major database packages on CD including Oracle, Sybase, and a few more. I can’t remember if MS SQL server is included though. That is really cool but it blows my mind because that software is super-expensive for companies to buy and implement and yet they all fit on one CD collectively.

I doubt the current versions all fit on one CD but I believe an individual cab download them and play with them for free. Given some personal initiative, that would be a great way to learn it from the ground up. It is probably overkill though if you just want to make some reports from simple select statements.

Thanks so much for the advice. One more question:

Is this the same book as the one mentioned above. It says that it’s the 4th edition (you linked to the 3rd) but the title is slightly different. I just want to make sure that I am getting the newer edition of what was recommended rather than something different.

Thanks…

That is not the one I was referring and I would venture to guess the others as well. The one you linked to is a more specific one in the series.

I was talking about this one:

http://www.amazon.com/gp/product/0201447878/qid=1135989187/sr=1-2/ref=sr_1_2/104-2856786-4019158?s=books&v=glance&n=283155

Sorry to be a pest, Shagnasty but would you do me one more favor and take a look at the content of the two books? You can look at the first few pages of the book on Amazon. It looks from the Tables of Contents that the books are the same and that they slightly changed the title for the 4th edition.

Thanks very much.

You are correct. I wasn’t aware they came out with a new edition. I saw the one I had at B&N just the other day. That’s the (new) one.

I was actually just thinking about you last night. I am a consultant that does a ton a SQL work. I am assigned to tutor several employees at my client on how to use SQL.

Someone else suggested using MS Access as a start. That really isn’t a bad idea to learn concepts if you have it around. Concepts are way more important than syntax.

What is your level of understanding now? What do you want to do? If you have Access, I can give you some simple exercises that will teach it to you simple stuff quickly (nothing formal or fancy).

You are too kind. As a matter of fact, I just finished an Access 2003 tutorial to prepare myself for SQL. It was supposed to be a ten week class or something but I got ahold of an instructor’s manual and did it in my spare time at work. It was really easy but I realize that SQL is a whole 'nother animal.

I’ll be using SQL to link a few technical data bases together and then try to find trends for product yield improvement. Once I learn it well enough, a high priced SQL consultant (such as yourself) will be out of a job. :stuck_out_tongue:

Thanks again.

I’m sure you’ll do well but I am still learning just like everyone is. There is a lot to potentially know. I just finished writing the longest SQL statement of my life last week. It is 656 code lines long (28 pages printed 8 point font) and I had to do it without any error checkers. One missed comma and the whole thing breaks. Break out the magnifying glass and get ready for a few hours of fun. You will see your own joy soon. Learn a good formatting style early on and use it. It isn’t a big deal when the queries are a few lines long but as they grow, you will need a way to make it readable.