Results for “recursive CTE”
Small, practical examples. Search by task or narrow things down below.
Update rows selected by a related table
SQL Server: Use EXISTS to limit updates based on an independent eligibility table.
SQL Server✓ Tested
Update rows selected by a related table
Postgres: Use EXISTS to limit updates based on an independent eligibility table.
Postgres✓ Tested
Update rows selected by a related table
SQLite: Use EXISTS to limit updates based on an independent eligibility table.
SQLite✓ Tested
Use a recursive function for a bounded calculation
Bash Scripts: A recursive factorial demonstrates local variables and a clear base case.
Bash Scripts✓ Tested
Visit files recursively
Java: Close the stream returned by Files.walk and sort relative paths for stable output.
Java✓ Tested
Visit selected elements
Use jQuery each to label every item with its one-based position.
jQuery✓ Tested
Wait until all selected elements finish animating
jQuery: promise observes the animation queues for every matched element.
jQuery✓ Tested
Apply a stash while keeping the saved entry
Git: Apply restores changes without removing the stash reference.
Git✓ Tested
Apply and remove a successfully restored stash
Git: Pop removes the entry only after a successful application.
Git✓ Tested
Build a query from several named stages
SQL: Separate row selection from aggregation using two common table expressions.
SQL✓ Tested
Build a query from several named stages
SQL Server: Separate row selection from aggregation using two common table expressions.
SQL Server✓ Tested
Build a query from several named stages
Postgres: Separate row selection from aggregation using two common table expressions.
Postgres✓ Tested