0

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:

  1. when inserting a new row, create_date has to be instanced with current_timestamp
  2. 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

Shadow
  • 33,525
  • 10
  • 51
  • 64
Icy B
  • 13
  • 3

0 Answers0