RE: [NF] Trigger question

2017-08-16 Thread Dave Crozier
Mike, You are correct in your assumption and you DO need to add the where clause. Dave -Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of mbsoftwaresoluti...@mbsoftwaresolutions.com Sent: 16 August 2017 04:07 To: ProFox Subject: [NF]

Re: [NF] Trigger question

2017-08-15 Thread mbsoftwaresolutions
On 2017-08-15 23:06, mbsoftwaresoluti...@mbsoftwaresolutions.com wrote: MariaDB backend (but could be SQL Server too) Given this trigger: UPDATE MyTable SET cItemID = new.cID WHERE cItemID = old.cID My question: will this trigger fire even if the old.cID = new.cID? Or do I need to add to the

Re: [NF] Trigger question

2017-08-15 Thread Stephen Russell
To me this is a trigger that will update a date column with the current datetime. Your example could see the where clause below that finds the row that is either just created or just updated. You can't be changing the column that is a part of the where clause. CREATE TRIGGER