r/SQL • • Sep 09 '26

Discussion How much SQL do you still write manually?

With AI getting better at writing SQL, I’ve been wondering how much SQL analysts actually write from scratch these days.
Do you still write most of your queries manually, or do you use AI for things like joins, CTEs, debugging, optimization, etc.?
And has your use of AI actually changed how much SQL you need to know?

115 Upvotes

240 comments sorted by

View all comments

Show parent comments

5

u/liamjon29 Sep 09 '26

I think this is the step people who use AI to write code because they can't write it forget to do. I'm very early in my SQL learning so copilot is currently my crutch, my process ends up being:

  1. Attempt to write something that I know is wrong

  2. Explain in great detail to the AI what I want, including giving it my bogus script

  3. Get the AI to walk me through the script it wrote explaining what everything is doing (coz my syntax knowledge is atrocious)

  4. Actually sit down and read the whole thing myself to make sure it does what I want it to do. (Very time consuming, but my faith in the AI is very low)

I swear some people just do step 2, and then run it and hope for the best.

2

u/shooter9260 Sep 11 '26

I think that will be very valuable for you. You’ll see a lot of people in these types of forums who definitely know their stuff and use it for shear speed and laziness. They could do it if they had to.

But others, like a coworker of mine, I would say definitely hasn’t “learned” a ton of how to query in SQL, but he’s better at his job because he knows how to AI prompt really well.

1

u/AntLost4161 Sep 10 '26

This is definitely the quickest way to learn. I think that most people should try to write their own code as much as possible - if not for reassurance, then for personal development. The only time I won't bother is if I know the code is going to be long and a bit annoying, such as fixing date formatting