MySQL Trigger not firing AFTER INSERT
<p>I have created a new trigger in my MySQL database to update a cell value after an insert. The cell that I want to update (gp_per) as default is set to a null value.</p>

<p>Here is the trigger:</p>

<pre><code>SET @gp_per = ((@retail_price - (@retail_price * 0.23)) - @cost_price) / (@retail_price * 0.23)
</code></pre>

<p>It created fine and I got no syntax errors but when I try to insert a new row, the gp_per cell is down as NULL rather than updating with the correct value. I haven't really used triggers before so I'm not 100% sure what I am doing wrong.</p>

<p>Below is the trigger:</p>

<p><a href="https://i.stack.imgur.com/r2JRt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r2JRt.jpg" alt="enter image description here"></a></p>

<p>And the structure of the table: </p>

<p><a href="https://i.stack.imgur.com/DdS19.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DdS19.png" alt="enter image description here"></a></p>

<p>Thanks for any feedback!</p>