Avoiding Mistakes

SQL is an unusual computer language: It's not just for experts. There are still relatively few SQL mavens. Many users, in fact, are really C programmers or accountants or technical marketing whizzes. They pick up SQL on their own and learn by doing. They develop some skill but remain only occasional users. When they hit a snag, they don't have the luxury of appealing to a nearby guru.

Let's face it: SQL can be confusing. The code samples that follow are based on real-life problems submitted via the Internet, transposed to work on the now-familiar bookbiz database. In this case, though, they aren't examples to model or copy—they are illustrations of common misuses and misunderstandings.

This section doesn't contain complete explanations ...

Get Practical SQL Handbook, The: Using SQL Variants, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.