The “Numbers” or “Tally” Table: What it is and how it replaces a loop – SQLServerCentral

Many people have used a “Numbers” or “Tally” table without really knowing what it does. This is an introduction as to how a Tally table replaces a loop.