Last week, I posted an article on creating a table of numbers. Today, I am continuing by creating a table of dates. Like before, this is a table that we expect to build and write to once, and then read from many thousands of times.

This script has the following assumptions.

  1. The schema ref already exists.
  2. The table ref.numbers already exists.
  3. US English is the only language and culture that you care about. If you need to support other languages and cultures, I recommend that you have a second table foreign keyed to this dates table that includes the culture info.

What other columns would you include in your dates table?