How do I insert a row into a table while updating one field?

I have a requirement like, suppose I have a properties table that has a "Listing" field, and I want to make an entry in another table, say the "property_history" table, whenever the "ListingKey" field is updated. How is this possible with mysql? should I use a trigger, how can I use it?

Please help me,

Thanks,: Jimit

+2


a source to share


1 answer


With a trigger you can achieve this easily

following link for creating my SQL run



http://dev.mysql.com/doc/refman/5.0/en/create-trigger.html

+1


a source







All Articles