How to store historical records in a history table in SQL Server

后端 未结 9 974
失恋的感觉
失恋的感觉 2020-11-28 21:24

I have 2 tables, Table-A and Table-A-History.

  • Table-A contains current data rows.
  • Table-A-History c
9条回答
  •  迷失自我
    2020-11-28 21:49

    The recent versions of SQL server (2016+ and Azure) have temporal tables which provide the exact functionality requested, as a first class feature. https://docs.microsoft.com/en-us/sql/relational-databases/tables/temporal-tables

    Somebody at Microsoft probably read this page. :)

提交回复
热议问题