Using the WITH RECURSIVE clause

The WITH clause comes in two forms:

  • Standard CTEs as shown in the previous section (using the WITH clause)
  • A method to run recursions in SQL

The simple form of a CTE has already been covered in the previous section. In the next section, the recursive version will be covered.

Get Mastering PostgreSQL 10 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.