question

kumara44 avatar image
kumara44 asked

Need to store only records deleted in the main temporal table be stored in history table.Is this possible.?

I want to use temporal table feature of SQL server. If I delete a record in main table, copy should be stored in history table. If I update a record in main table, I do not want that the updated record history to be stored in history table. Is it possible to limit the history table to store only deleted records (not updated records) .

delete-backup
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ThomasRushton avatar image ThomasRushton ♦♦ commented ·

This doesn't sound like a good match for temporal tables; perhaps use a trigger on delete to move data into a separate table?

0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.