How to automatically update updated date column on row update in RedShift?
I have a table in Redshift that has an UpdateDate column of type timestamp. The column is defined as
UpdatedDate timestamp DEFAULT getdate()
Therefore, when a new record is inserted, the date is stored correctly in this column. The problem is in the case of an update. When updated, this column is not updated. I need the UpdateDate column to automatically update when the data in the row changes.
I know we can specify the column in the update request, but I have no control over the request and cannot add the column there.
I tried using Triggers
, but Redshift doesn't seem to support them. Thank you for your time. Let me know if any other information is needed.
+3
source to share
No one has answered this question yet
Check out similar questions: