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?)
WHERE id = Changed_Row_ID