Reputation: 62294
I have a table COMPANY
where companies are kept. I want to create a view of that table, let's name it COMPANY_CDC
but with one caveat:
When an entry in the original table is deleted, I want to set a deleted
flag on the view entry instead of deleting it.
EDIT Why soft deletes? The point is that im performing change data capture using JDBC, and JDBC is only able to capture soft deletes. Inserts / updates are no problem.
If this cannot be done by using a view, what would be an alternative solution?
Upvotes: 0
Views: 36
Reputation: 496
You can insert deleted values in another table using trigger , and with join of these two table you can create your view.
Upvotes: 1