r/learnSQL • u/DevLegend26 • 3d ago
SQL keywords every developer should actually know — from beginner to advanced
I recently put together a practical SQL guide after realizing something:
Most developers learn SELECT, INSERT, UPDATE, and DELETE pretty quickly… but production SQL gets a lot more interesting after that.
Things like:
INNER JOINvsLEFT JOINCAST/CONVERTDATEADD/DATEDIFFGROUP BY/HAVINGSET NOCOUNT ONSET ANSI_NULLS- Transactions and
ROLLBACK SCOPE_IDENTITY()NOLOCK,ROWLOCK,READPAST@@ROWCOUNT,@@ERROR,@@SPIDEXECUTE AS OWNEREXISTSvsINTRY...CATCH
I tried to explain these from a real-world developer perspective, rather than giving textbook definitions — including where they can actually be useful and where you should be careful.
The guide is organized from beginner concepts through more advanced SQL Server features, with examples using a simple Employees and Orders dataset.
I'm curious:
What SQL keyword, function, or feature do you think developers commonly misunderstand or misuse?
For me, NOLOCK would probably be high on that list. 😄
Would love to hear what you've seen in real production code.
3
-2
6
u/reditandfirgetit 2d ago
I skimmed it to get a feel for what you were trying to communicate. You're eager and that's good. This article is too long and missing things.
For example, NOLOCK is not recommended unless it doesn't matter that you can pull inaccurate data (dirty reads). In a financial system you wouldn't want to use it
(Removed the windows function comment, I see it's a future article you want to write)
Advanced developers should know how to data model at least 3NF, how indexes work, how to read an execution plan
I would break it into a series, dont use AI to write it. Write it yourself, have AI review as an editor would. You'll retain information better that way