This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
A long clothesline of washing, fresh sheets at one end and dry ones taken down at the other.

Temporal Table Retention: Cleaning Out Old History Automatically

January 22, 2018
Pinal Dave
SQL Tips and Tricks
SQL Server, SQL Server 2017, Temporal Table

Set temporal table retention, check history cleanup settings, and choose a history index that lets old versions leave safely.

Read More
Earlier plant stages remain visible beneath the current version on layered vellum

Special Icon on System-Versioned Table in SQL Server 2016 – Interview Question of the Week #101

December 11, 2016
Pinal Dave
SQL Interview Questions and Answers
SQL Server, SQL Server Management Studio, SQL System Table, Temporal Table

Expanding tables in WideWorldImporters in SSMS 2016, you see an icon like a watch. It marks a System-Versioned table, also known as a temporal table.

Read More
An old park bench with chipped slate blue paint showing earlier coats beneath, work gloves and a paint tin on the seat.

Who Changed This Row? Temporal History With FOR SYSTEM_TIME ALL

June 17, 2016
Pinal Dave
SQL Tips and Tricks
SQL Audit, SQL Scripts, SQL Server, Temporal Table

Read FOR SYSTEM_TIME ALL with LAG to compare row versions, choose temporal window boundaries, and record an actor when identity matters.

Read More
SQL SERVER 2016: Creating Simple Temporal Table

SQL SERVER 2016: Creating Simple Temporal Table

February 10, 2016
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Server 2016, SQL Utility, Temporal Table

Want to see what your data looked like on a past date? Here is how to create a simple Temporal Table in SQL Server 2016, with its history table made for you.

Read More
A chessboard mid-game on a cafe table with empty chairs, one knight off its square, two cold cups of coffee.

Who Changed This Row? Auditing Data Changes

June 10, 2015
Pinal Dave
SQL Tips and Tricks
Change Data Capture, SQL Audit, SQL Server, SQL Trigger, Temporal Table

Auditing data changes requires choosing whether you need old values, new values, actor identity, or a change feed, then testing the cost.

Read More
An offset icing spatula beginning a new icing section beside a finished section

Adding System Versioning to a Table That Already Has Rows

July 31, 2013
Pinal Dave
SQL Tips and Tricks
SQL Server, SQL Table Operation, Temporal Table

Turning on temporal history for a table that already has data does not rebuild the past. Here is the clean way to do it, and the traps to avoid.

Read More
Two long layered ice cores side by side, a gloved hand stretching a red thread across both at the same band.

Joining Two History Tables at a Point in Time With FOR SYSTEM_TIME AS OF

August 19, 2009
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Joins, SQL Server, Temporal Table

Use FOR SYSTEM_TIME AS OF to join temporal tables at one UTC instant, compare range forms, and index the history lookup correctly.

Read More
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com