r/SQL • • 23h ago

Discussion 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.

9 Upvotes

19 comments sorted by

5

u/Discordbothost 22h ago

Check which database your job uses first. If it's SQL Server, T-SQL Fundamentals by Itzik Ben-Gan covers joins through transactions, with exercises. Work through those in a practice database alongside the book.

1

u/420ball-sniffer69 22h ago

It’s a mix of mariadb Postgres and sql server

3

u/ComicOzzy sqlHippo 21h ago edited 21h ago

"Practical SQL" by DeBarros covers Postgres with a bit of Data Analytics slant.

TSQL Fundamentals and Practical SQL are by far the best SQL books I've read.

And yes, get them both because SQL Server and Postgres are different enough that you'll want specific books for each.

The same goes for MariaDB (MySQL) but I don't have a recommendation for that.

1

u/Time_Advertising_412 14h ago

You might take a look at MariaDB Essentials by Emilien Kenler & Federico Razzoli. Also Murach's SQL Server 2022 for developers by Joel Murach is very good.

1

u/CanWeTalkEth 21h ago

Mastering Postgres

-1

u/420ball-sniffer69 21h ago

What does that mean

1

u/reditandfirgetit 20h ago

Its a book tailored to postgres?

1

u/420ball-sniffer69 15h ago

Written by who? Which edition

1

u/reditandfirgetit 15h ago

Google is free.  You asked for recommendations not a jacket summary

1

u/MarionberryAlone6004 16h ago

Which typewriter company do you work for? Just read their manual.

1

u/420ball-sniffer69 15h ago

Was that meant to be helpful

1

u/reditandfirgetit 20h ago

The most useful sql book I had was SQL on a nutshell. Had multiple engines and showed what the differences were. Firvexample GETDATE() in sql vs NOW() in postgres

1

u/J2112O 19h ago

SQL Queries For Mere Mortals was a good one for me and helped me learn a lot.

1

u/LateRegular6573 16h ago

Im on o'reilly so you can have a choice of a couple hundred

1

u/ComicOzzy sqlHippo 13h ago

That's part of the problem for a lot of new learners: too many options and you don't yet have the knowledge to evaluate them as being worth your time and effort.

1

u/LateRegular6573 12h ago

For beginners the first chapter is usually pretty good and usable. But they can do book reviews and go sample the books

1

u/No_Addition_992 15h ago

Buy the book for the database you use most at work, not all three at once — Postgres, MariaDB and SQL Server differ enough that one book won't cover them all. Work the exercises in a real database as you read, and focus first on SELECT, JOINs, GROUP BY and aggregates, then window functions.

1

u/LateRegular6573 8h ago

A person interested in coding needs to find their own answers rather having others do the work for them. At least give evidence what you have done for yourself and what were the results.