4 ms·
Also SQL is not turing complete. I see it more as a descriptive language like e.g. html is a language but not a programming language.
by randomNumber7 10mo ago
Also SQL is not turing complete. I see it more as a descriptive language like e.g. html is a language but not a programming language.
- rawgabbit 10mo agoIt can do loops and recursion. It can use as much memory as it is allowed. It can do general programming via functions and stored procedures.
- lateforwork 10mo agoIt can't do loops. Unless you're talking about extensions to SQL such as PL/SQL and T-SQL.
- geysersam 10mo agoIt can do loops. Recursive CTEs has been in the standard since SQL:1999 https://en.wikipedia.org/wiki/SQL:1999 https://en.wikipedia.org/wiki/SQL:1999
- hunterpayne 10mo agoThis is completely wrong. The SQL spec isn't Turning complete but multiple DBs provide Turing complete extensions (like pgplsql) that make it so. Also, even without the extensions, it is still very much a programming language by any definition of the term. Like most takes on SQL, it is more about your understanding (or lack thereof) of SQL.
- bigstrat2003 10mo agoIf the spec isn't Turing complete, only individual extensions to the spec, I think it's correct to say "SQL isn't Turing complete".
- geysersam 10mo agoI was under the impression that recursive CTEs make the SQL spec Turing complete. Not that it makes any practical difference, it's still very difficult to use for "general purpose" programming, and still very practical to use for data processing / management. Last year I read about some database researcher who implemented AoC in pretty standard SQL.