March 2018
Intermediate to advanced
816 pages
19h 35m
English
Assume that the table is empty and you have added the Fog product with a 150 price on 12th November 2017. Here is the code for this action:
INSERT INTO dbo.Product(ProductId, ProductName, Price) VALUES(1, N'Fog', 150.00) ;-- on 12th November
The state of the current table is as follows:
|
ProductId |
ProductName |
Price |
ValidFrom |
ValidTo |
|
1 |
Fog |
150 |
12.11.2017 |
31.12.9999 |
The state of the history table is as follows:
| ProductId | ProductName | Price | ValidFrom | ValidTo |
|
|
|
|
|
|
As you can see, after an INSERT into a temporal table, ...
Read now
Unlock full access