Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
The very basics
Infinite looping
Processing trees with recursive CTEs
Processing graphs with recursive ctes


Excellent. Let's do an additional exercise to practice.


Create a recursive query that will show three columns:

  • Numeven numbers from 2 to 20 (inclusively),
  • NumPlusPrev – the current even number plus the previous even number,
  • NumSquare – the current even number squared.

Stuck? Here's a hint!

In order to get squared values, you may multiply the value by itself.