3 ms·
The advantage of CTEs is they have the explicit "WITH RECURSIVE" option. Whereas an aliased SELECT statement can't refer to itself as far as I know.
by adwf 13y ago
The advantage of CTEs is they have the explicit "WITH RECURSIVE" option. Whereas an aliased SELECT statement can't refer to itself as far as I know.
- socialist_coder 13y agoAhhh, just read about that. The equivalent of the Oracle "start with, connect by" clause (http://docs.oracle.com/cd/B19306_01/server.102/b14200/queries003.htm#i2060615 http://docs.oracle.com/cd/B19306_01/server.102/b14200/querie...). Good to know.
- twic 13y agoRecursive CTEs are super amazing. One of the great underused features of SQL. Give me tall PostgreSQL and a WITH RECURSIVE to steer by, and i will happily take on any graph database. Not promising i'll win, mind.