Comment

Comment by andsoitis

> While SQL isn't normally used as a general purpose programming language I think it's quite illustrative for those otherwise unfamiliar with declarative languages (though apparently it is Turing complete)

SQL itself is not Turing complete in its standard form because it lacks some essential features of a Turing machine, such as the ability to simulate unbounded loops or recursion within a single query.

SQL with procedural extensions, such as PL/SQL (Oracle), T-SQL (Microsoft), and PL/pgSQL (PostgreSQL), are Turing complete because they allow constructs such as loops, conditionals, and recursive functions.

parent andsoitis 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton