Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

…Is SQL a programming language?


SQL is definitely a domain specific declarative programming language.

https://en.wikipedia.org/wiki/SQL


yes it is, surely that's not even controversial?

It's even Turing complete (not that a programming language needs to be)

It's just not a general purpose programming language like e.g. Python/C/Java/etc


Good question!

Unlike it seems almost everyone else replying here, I'd say it is a query language and not a programming language.

Maybe an artificial distinction, but I don't think of SQL statements as programs.


Same question for HTML. In my mind, HTML is a markup language. Maybe I am unaware of more advanced features that fall into the programming language category.


For me HTML is a declarative programming language with a very small feature set. Many people disagree with me and I’m ok with that.

The argument of “it’s a mark up language” tends to not hold weight for me as when I ask people why they say “because it’s in the name” - which, for me, misses that HTML is considerably more developed now than when it was named and should be measured on the current feature set.

It’s not a hill I’d want to die on though so really, it doesn’t matter.


HTML isn't turing complete, which, along with other limits make it very limited as a programming language, but it does support programming behavior to some extent without resort to another language, so it certainly makes sense in that regard to call it a programming language.



Yes, SQL, HTML, CSS (not on this list apparently), XML, JSON, YAML and a couple others are all declarative 'programming' languages. I don't know if there's a formal definition of what is and isn't a programming language tbh, but either way I wouldn't consider them lesser for whichever reason.

That said, I think SQL, CSS and maybe HTML are the only ones that are a league of their own, that is, you could get a job as a pure CSS or SQL programmer.


Apparently yes, the more controversial one is HTML.


What about HTMX? HTML syntax with more rich options, but the "language" is still HTML.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: