Joe Celko's SQL for Smarties: Advanced SQL Programming and over one million other books are available for Amazon Kindle. Learn more

Vous voulez voir cette page en français ? Cliquez ici.

Sign in to turn on 1-Click ordering.
Amazon Prime Free Trial required. Sign up when you check out. Learn More
More Buying Choices
Have one to sell? Sell yours here
Start reading Joe Celko's SQL for Smarties on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Joe Celko's SQL for Smarties: Advanced SQL Programming [Paperback]

Joe Celko

List Price: CDN$ 76.98
Price: CDN$ 61.18 & FREE Shipping. Details
You Save: CDN$ 15.80 (21%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
Only 9 left in stock (more on the way).
Ships from and sold by Gift-wrap available.
Want it delivered Tuesday, October 28? Choose One-Day Shipping at checkout.


Amazon Price New from Used from
Kindle Edition CDN $50.32  
Paperback CDN $61.18  
Join Amazon Student in Canada

Book Description

Oct. 18 2010 0123820227 978-0123820228 4
Joe Celkos SQL for Smarties: Advanced SQL Programming offers tips and techniques in advanced programming. This book is the fourth edition and it consists of 39 chapters, starting with a comparison between databases and file systems. It covers transactions and currency control, schema level objects, locating data and schema numbers, base tables, and auxiliary tables. Furthermore, procedural, semi-procedural, and declarative programming are explored in this book.
The book also presents the different normal forms in database normalization, including the first, second, third, fourth, fifth, elementary key, domain-key, and Boyce-Codd normal forms. It also offers practical hints for normalization and denormalization. The book discusses different data types, such as the numeric, temporal and character data types; the different predicates; and the simple and advanced SELECT statements. In addition, the book presents virtual tables, and it discusses data partitions in queries; grouping operations; simple aggregate functions; and descriptive statistics, matrices and graphs in SQL. The book concludes with a discussion about optimizing SQL. It will be of great value to SQL programmers.


  • Expert advice from a noted SQL authority and award-winning columnist who has given ten years service to the ANSI SQL standards committee
  • Teaches scores of advanced techniques that can be used with any product, in any SQL environment, whether it is an SQL 92 or SQL 2008 environment
  • Offers tips for working around deficiencies and gives insight into real-world challenges

Frequently Bought Together

Joe Celko's SQL for Smarties: Advanced SQL Programming + Joe Celko's Thinking in Sets: Auxiliary, Temporal, and Virtual Tables in SQL
Price For Both: CDN$ 99.49

Customers Who Bought This Item Also Bought

Product Details

Product Description


"This book is a classic, and this revision will merely solidify its position." --Rudy Limeback

"This book focuses on the problems of standardization and the related problems of measurements. It is clearly intended to encourage designers to at least be aware of the problems, before their database designs go live."--Jeffrey Putnam, October 2010,

From the Back Cover

SQL for Smarties was hailed as the first book devoted explicitly to the advanced techniques needed to transform an experienced SQL programmer into an expert. Now, 15 years later and in its fourth edition, this classic reference still reigns supreme as the only book written by a SQL master that teaches programmers and practitioners to become SQL masters themselves! These are not just tips and techniques; also offered are the best solutions to old and new challenges. Joe Celko conveys the way you need to think in order to get the most out of SQL programming efforts for both correctness and performance. New to the fourth edition, Joe features new examples to reflect the ANSI/ISO Standards so anyone can use it. He also updates data element names to meet new ISO-11179 rules with the same experience-based teaching style that made the previous editions the classics they are today.

Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index
Search inside this book:

Customer Reviews

There are no customer reviews yet on
5 star
4 star
3 star
2 star
1 star
Most Helpful Customer Reviews on (beta) 4.3 out of 5 stars  23 reviews
8 of 8 people found the following review helpful
3.0 out of 5 stars Some good coverage of advanced topics, with some issues July 21 2012
By King B - Published on
Format:Paperback|Vine Customer Review of Free Product
This book attempts to go over some advanced topics in SQL programming. While it succeeds in showing these concepts, the main issue is that the implementations are too generic and don't work in every implementation of SQL. It would be nice to see a table or indication of some sort that shows if the topic discussed works in an individual implementation of SQL. As I read a section that sounded great, I would test it out in Microsoft SQL server only to find that it was not supported. It would be nice to know if what was discussed was available in any SQL implementation or if it was only part of the ANSI SQL XX standards. He talks to SQL-92 standards that he says are not implemented in many (or any!) database engine... That does not help.
For the items that are applicable, they are so specific, I can't image any time that I would need them. For example matrix multiplication and graph theory.
On the advanced topics, the real good ones are covered in more detail in his other books. I would recommend Joe Celko's Trees and Hierarchies which goes into more detail from the trees section in this book.
Overall, I'm glad I reviewed this book, but I would like to see a language specific version that provided working examples.
6 of 6 people found the following review helpful
5.0 out of 5 stars Celko Rules! Dec 6 2010
By Darwin's Bulldog - Published on
Format:Paperback|Vine Customer Review of Free Product
I learned SQL from the first edition of this book, many years ago. Some of the material covered in that edition has been moved to different books and this basically reflects the emergence of SQl as the lingua franca of databases and the burgeoning demands placed on developers. So in some cases, the reader may have to look at other texts for specific coverage of items sch as Trees and Heirarchies.

What I have always liked about Joe Celko's books is that once you start reading, it's hard to stop. He likes to explain why the SQL standards are written the way they are, often including why SQL databases are not as portable as might be expected. Since his books are not vendor specific, he can provide tips and hints, and in some cases what NOT to do, for several of the main vendors. There is much pedigogy presented; perhaps not always of direct value, but certainly interesting.

Joe lays a substantial foundation about data types, NULLS, implementation and the set theory basis of SQL. In fact the basic SELECT statement does not even get detailed attention until Chapter 24. But remember, this is a book for 'Smarties' and many of the difficulties of getting SQL to return specific result sets are presented in earlier chapters. Some familiarity with the language will be required.

After Chapter 24, the examples are many and the number of data retreival issues covered many: simple aggregates, OLAP, statistics, matrices, UNIONs, graphs, temporal queries, and optimization (even FoxPro gets a tip of the hat for speed).

Highly recommended!
6 of 6 people found the following review helpful
5.0 out of 5 stars Superb Development Dec 14 2010
By Santeria - Published on
Format:Paperback|Vine Customer Review of Free Product
After Learning the Basics of SQL as well as the admin side of Oracle SQL, the knowledge of how far SQL has developed in terms of being a language that gets data from one person to another, is quite an amazing piece of work, and the glitz for most people who see the result is in the User Interface, since they never see the hard work that goes on underneath the main part of an SQL data machine.
This book takes you through Tables as entities, tables as relationships, and the idea of Rows versus records.In the "great Schema" of things, Transactions and concurrency control is explained and illustrated in detail.Coming from the detail of Schema level Objects to the various types of Tables and the language issues from the earliest SQL to the later XML forms, it is all illustrated in this book for those who wish to work with the Core Essential that is SQL.
4 of 4 people found the following review helpful
4.0 out of 5 stars Some new material, But Not Enough To Pay for New Versus Older Editions Dec 3 2010
By William B. Dwinnell IV - Published on
Format:Paperback|Vine Customer Review of Free Product
By now, Joe Celko's books have become SQL programming standards. This title, "SQL for Smarties" is now in its 4th edition, and covers a wide mix of things a SQL programmer would want to know about, after learning the basics of SELECT..WHERE, such as date/time math, advanced queries, and odds and ends like calculating medians across records.

With books like "SQL for Smarties", which have been around long enough, readers have the choice of paying for the newest edition or saving their money by buying an older edition. I happen to own the second edition, and I notice that material from that edition has been re-arranged, and several new chapters have been introduced. Unless one requires something available only in the latest edition, I recommend finding an older edition.

To put this review in context, I have many years of experience writing in procedural programming languages, but only occasionally develop SQL code.
4 of 4 people found the following review helpful
3.0 out of 5 stars Great Content Horribly Written Aug. 9 2013
By Amazon Customer - Published on
Format:Kindle Edition|Verified Purchase
This book has some fantastic information in it on how to properly write SQL code, especially from the perspective of a programmer in a structured language. The major glaring problem with the book is its editing. There are typos everywhere, many of them in code examples, which breaks them. Additionally large portions of the text are copied from chapter to chapter, probably making up 5% of the book. This seems lazy and also makes the book more confusing as you get a nagging feeling of deja vu. With a good editor this book might be worth 5 stars. As it is the book is only 3, causing a lot of confusion and problems where there shouldn't be any.

Look for similar items by category