Very debatable. Some dialects (like PL/SQL) are programming languages or at least can be used as programming languages. But SQL in general isn't Turing-complete and isn't a programming language. It is query language.
Some SQL implementations are turing complete, for example PostgreSQL
I would argue Turing-completeness doesn't define a programming language, although it is a part of it. So SQL is still not a programming language even in Postgres.
A more general definition is a language meant for writing programs, and neither HTML docs nor SQL queries are supposed to be programs, although they are interpreted by programs
It's a vehicle for helping to explain to people why we don't actually write HTML by hand anymore. I'll go out on a limb here and say that scribing HTML actually sets you back on your quest to become gainfully employed as a FE developer in current_year
Like especially now with generative AI. Just ask ol GPT to write your HTML and get good at asking them.
It's almost like we already have a great naming scheme for programming, markup, styling, and query languages and the different languages in each category fit perfectly in the category they were literally designed to fit in. Why all the debate about reclassifying languages in categories that they were never designed to fit into
If only the people who created the languages being discussed here went that extra mile to include that exact classification as part of their acronym, then these arguments wouldn't exist... /s (just in case)
In that definition then HTML is also a programming langauge. It is a set of grammatical rules for instructing a computer to perform the task of displaying a web page correctly.
If you’re using SQL to write programs, then something is amiss. It’s meant to be used to query and update databases, not to be a calculator or something like that.
Ive seen and worked on 1000+ line long sqls before. In the olden days people used to do actual business logic with it. Its considered bad practice now. But its still a programming language.
49
u/Demistr Jun 01 '23
SQL definitely is a programming language.