Instead of explicitly writing an update statement, you would simply assign the new values via the transition variables NEW.
Check the documentation, there's an example in there, if I remember correctly.
Besides that, my recommendation around triggers would be: don't use them.
If you want to ensure clean data entry to your tables - there are other and better methods to achieve this.
With triggers in place, you've build yourself a maintenance nightmare that not even you as the creator have a good grasp on, let alone the poor next guy who has to support the application in years to come.
Also, the required logic typically is not limited to just a single table (e.g. checking cross references, totals, etc.) and so you end up with a high level of barely visible dependencies.
Last but not least, triggers slow down your transaction processing and nobody wants that, right? ![]()
- Lars