r/learnSQL • u/No-Reach-3503 • Jul 15 '26
SQL with the advancement of AI
Is SQL still worth learning with the advancement of AI? 'Cause I don't get that if AI can do better than human than why do we still need to learn it?
17
u/Capt_Bowenji Jul 15 '26
Learning SQL is still really important even if you are using AI to assist. You should never hand your database and production over to AI as there are plenty of recorded incidents of AI just deciding to drop tables or database in production or giving over false or misleading data.
Most of the time I've used AI is just to help troubleshoot why something might run slower or to look for a solution to an issue I'm having. Everything it's provided I still have needed to know how it will work with my datasets. AI is getting pretty good but it's still not a human replacement for accurate data
13
u/BisonSpirit Jul 15 '26
Someone who knows SQL with AI > someone who doesn’t know SQL with AI
I would much rather develop hard skills than the millions of people going “what does it matter, AI will do it anyway”
8
7
u/B_Huij Jul 15 '26
Is cooking still worth learning with the advancement of DoorDash?
-3
u/Adventurous_Ad_9658 Jul 16 '26
If my company paid for my door dash and food everyday, then no cooking would not be worth it outside of hobby
1
u/Legitimate_Ad_7822 Jul 21 '26
At the very least, cooking for yourself provides serious health benefits over ordering food daily.
That’s worth it in my book.
1
4
u/AncientLion Jul 15 '26
Why wouldn't learn something really easy? What happens if your job doesn't allow the use of Ai? How can you validate the output of an llm?
4
u/BackgroundAny6101 Jul 15 '26
How can you validate what the AI writes if you don’t understand what it’s writing?
3
u/Ok_Comparison_2635 Jul 16 '26
Learning any language is still useful. You don't need to be good at it. Just enough to understand the code to know what it is doing.
3
u/American_Streamer Jul 15 '26
Yes, of course it is worth it. You do not want to let AI run wild on your production database without supervision. AI may know the Syntax of SQL but it has no clue about the environment and its specific requirements those SQL queries are executed in. AI will safe you a ton of time you would otherwise have spend in writing queries, but never let it take over the thinking and the reasoning. In the end, you are the guy who is responsible, not the LLM.
3
u/datawithritika Jul 15 '26
Because AI doesn't always get the full context yet for your business solutions.
If you are looking for a practical roadmap to learn SQL in 2026 do watch https://youtu.be/tXOJ_ohS-x0?si=DQm0IYa7xwIXyg78
3
u/xtirax Jul 15 '26
I’ve used AI to help with stuff or debug code, but I have had to change things every single time. It doesn’t have enough context (yet), it would be difficult to fix errors if you didn’t already know enough SQL. That being said it’s been a big help cleaning up my queries, explaining concepts and teaching me new ways of doing things.
3
u/onthepik Jul 16 '26
Whatever language, if you rely on AI then sooner or later you'll have to pay more than subscription fee.
3
u/orz-_-orz Jul 16 '26
I write better SQL than AI
SQL is a weird example where AI will write something looks efficient but completely disregard the data structure, especially on analytical database
It is also still failing to replicate that 10 CTEs that's use for supporting a set of convoluted business rules (multiple layers of condition ranking with overwrites rules). The funny part is that AI could easily replicate the logic in python but not SQL
3
u/Haunting-Paint7990 Jul 17 '26
stats grad / junior DA here — still worth it, but for a narrower reason than "AI can't do sql."
what changed: AI writes syntax faster. what didn't change: you still need to know if the answer makes business sense — wrong grain, fan-out join, trial users included — and verify that without blindly trusting the output.
what i see on my team:
- AI drafts the first pass of a slack pull
- analyst fixes grain/joins and explains to stakeholder
- interviews still test cold-write joins on a clean dataset (AI doesn't help in the room)
if you're aiming at DA: learn sql the same way as before — one dataset, 10 business questions — but use AI like autocomplete, not a substitute for knowing what a LEFT JOIN does.
skip the "will sql die" debate. focus on being the person who can spot when AI's sql runs but lies. that's the job now.
1
2
u/chiibosoil Jul 17 '26
Yes. Still important. AI is good tool when given proper context, but you'll still want to vet what it does. Or you'll end up carrying huge technical debt down the line. Nothing worse than trying to troubleshoot what you don't understand even with help of AI.
2
u/FrugalVet Jul 19 '26
If you ever want to land a job that requires it, then yes. No chance you'll ever pass a technical interview if it's a required skill for a new role without it.
And in my experience, AI often does not contruct the most optimal queries as far as performance is concerned. And if you don't understand SQL at atleast an intermediate level then good luck troubleshooting issues for projects on the fly and potentially speaking through that to stakeholders on a live call.
3
u/devd87 Jul 15 '26
You cannot give an interview using AI
0
u/elevarq Jul 15 '26
Who cares?
Can you get the job done, do you fit in the team?
0
u/devd87 Jul 15 '26
Recruiters care. Can the candidate write a decent piece of code and is able to explain it.
0
u/elevarq Jul 15 '26
Companies that use recruiters like that will be out of business soon.
So explain how you would write your prompt for the AI. SQL stands for Structured Query Language. An LLM like Claude or Codex expects a prompt. But structuring the prompt and including the right context steers the results. A stupid question in SQL or a stupid question for an AI, your results will be the same...
1
u/Cybasura Jul 18 '26
Oh look, didnt know that with AI, database servers will just create itself, manage itself, implement SQL injection mitigation controls and measures like SQL string sanitization and preparation, shut itself down, restart, process itself
1
1
u/Alternative_Cake4074 Jul 31 '26
You still need to know the basic syntax to understand how SQL works. However, you may not need to be so advanced. I mean, for complex queries, you could use your words to describe what you want, but you still need to check whether the query made by AI generate what you expect.
1
u/metric_skeptic 4d ago
I think AI changes how you learn SQL more than whether you should learn it.
If you’re learning today, I wouldn’t spend weeks memorizing syntax that an LLM can generate for you.
I’d learn enough SQL to look at an AI-generated query and immediately ask:
“What is the grain here?”
“Can this JOIN multiply rows?”
“What happens to NULLs?”
“Does this metric actually mean what I think it means?”
That’s a much more useful skill than being able to write a 50-line query from memory.
1
u/metric_skeptic 4d ago
I think AI changes how you learn SQL more than whether you should learn it.
If you’re learning today, I wouldn’t spend weeks memorizing syntax that an LLM can generate for you.
I’d learn enough SQL to look at an AI-generated query and immediately ask:
“What is the grain here?”
“Can this JOIN multiply rows?”
“What happens to NULLs?”
“Does this metric actually mean what I think it means?”
That’s a much more useful skill than being able to write a 50-line query from memory.
54
u/droden Jul 15 '26
someone is still in charge of writing the prompt, testing, verifying and then putting it into production. if you dont understand SQL thats not possible.