Recursion in SQL-3
Limited forms of recursion are considered important.
Linear recursion: only 1 occurrence of a recursive predicate
Path( X, Y ) :- Edge( X, Y )
Path( X, Y ) :- Edge( X, Z ), Path( Z, Y ).
Pairs AS SELECT origin, dest FROM EDGE
RECURSIVE Path(origin, dest) AS
(SELECT Pairs.origin, Path.to
WHERE Pairs.to = Path.origin)