How to create a trigger that update the date field and time field upon modify of the row?
12
votes
1
answer
50180
views
I have created a table
testtable
inside the database testbase
that have the following structure:
product_no (int, not null)
product_name (varchar(30), not null)
price (money, null)
expire_date (date, null)
expire_time (time(7), null)
However, how do I write a trigger such that it will update that particular row that has been modified (or updated with new information) and record the modification date into the expire_date
field and the modification time into the expire_time
field? (or if this is possible?)
Asked by Jack
(2567 rep)
Sep 10, 2012, 04:55 AM
Last activity: Dec 21, 2016, 02:12 AM
Last activity: Dec 21, 2016, 02:12 AM