r/learnSQL • • 19h ago

Which books worked best for you?

I know this is potentially an FAQ and the common answer will be to point me to a website or a course but I’m in a bit of a tricky situation in that I need to learn SQL for my job but my employer will only fund books rather than courses so I was wondering which books worked best for you guys? Thanks.

13 Upvotes

3 comments sorted by

1

u/emsuperstar 18h ago edited 18h ago

Back when I started learning SQL I had one of the O'Reily books that I found to be a good introduction to SQL. Although TBH I feel like asking Claude to deseign a lesson plan for you could also work pretty well. AI is a bit OP atm, as it slowly accelarates Global Warming... haha 😭

1

u/420ball-sniffer69 18h ago

I’m really not a fan of AI and would rather have a well edited and structures introduction to the language tbh. I learn best that way

3

u/Reasonable-Pay-8771 17h ago

I picked up SQL for my job just a few years ago. The books I found most useful (and still keep on my desk) are The Handbook of Programming Languages: Little Languages and Tools, SQL in a Nutshell, and SQL Antipatterns. If you have any background in other programming languages, then the SQL chapter in the Handbook is just great IMO. It builds up your understanding with lots of little examples, show how to translate a data question from management into a structured pseudocode, then how you'd do it with for-loops and if-elses, and then how SQL expresses the same logic.

SQL in a Nutshell then has all the syntax details for all the various databases you might encounter: SQL Server, postgresql, MySQL.

SQL Antipatterns is also a great book to dive into early in your SQL journey. Every chapter shows a task, an obvious way to solve it, and then all the non-obvious problems that follow unless you do it this clever, non-so-obvious way. It's a whole book of other peoples mistakes that you can learn from.