I have this table in mysql db:
ID | ... | CREATE_DATE | UPDATE_DATE |
---|---|---|---|
Cell 1 | Cell 2 | Cell 4 | Cell 6 |
Cell 3 | Cell 4 | Cell 7 | Cell8 |
I need two triggers which have to behave like this:
- when inserting a new row, create_date has to be instanced with current_timestamp
- when updating a a row, the field update_date of this one has to be updated with current_timestamp
Could someone help me please?
I know trigger have "for each row " operations but I don't know how to act on a single row