mysql trigger to insert/update date column from datetime column
1
vote
1
answer
22847
views
probably simple question but can't get it to work:
I have a table with two datetime columns. In order to set up a date index and have simpler queries, i have added two date columns next to them.
Now, i would like to, whenever a row is inserted or updated, to extract the date part from the datetime columns, and insert or update the date columns.
Not very well versed with triggers, so pointers would be much appreciated.
server version: 5.1.49-3
Asked by Mathias
(121 rep)
Oct 23, 2013, 08:49 AM
Last activity: Dec 21, 2016, 01:43 AM
Last activity: Dec 21, 2016, 01:43 AM