Building Temporal Tables

Bert Wagner shows how to create a temporal table in SQL Server 2016:

I want to make my life easier by using temporal tables! Take my money and show me how!

I’m flattered by your offer, but since we are good friends I’ll let you in on these secrets for free.

First let’s create a temporal table. I’m thinking about starting up a car rental business, so let’s model it after that:

There are some places where temporal tables can get better (particularly around feeling more like a type 2 slowly changing dimension), but I’m pretty happy with this feature.

Related Posts

Business Use Cases For Temporal Tables

Bert Wagner walks through some of the business cases for using temporal tables: I know this query seems lame — it’s just a SELECT FROM statement. There are no FOR SYSTEM TIME clauses, WHERE statements, and no other interesting T-SQL features. But that’s the point! Have you ever had to get the “current” rows out of a […]

Read More

Temporal Table Q&A

Kevin Conan answers two questions around temporal tables: Hello again and welcome back to the series on Temporal Tables! Today we will take a look at two common questions.  What happens when I put a trigger on a Temporal Table and can I back populate the historical table? Read on for those answers.

Read More

Categories