title: MySQL: Trigger - Change value for different columns
body: <p>I've got a table like this</p>
  
  <pre><code> id     firstname   lastname    fullname
   1      alex        car         alex car
   2      tony        table       tony table
  </code></pre>
  
  <p>If the firstname or lastname gets changed I want that the database automatically changes the fullname too.</p>
  
  <p>I tried it with this trigger</p>
  
  <pre><code>CREATE TRIGGER mytrigger
  AFTER UPDATE
     ON mytable FOR EACH ROW
  
  BEGIN
  
      UPDATE `mydb`.`mytable` SET `fullname` = CONCAT(NEW.firstname, " ",NEW.lastname)    
  
  END;
  </code></pre>
  
  <p>But I get this error: <br /></p>
  
  <pre><code>#1442 - Can't update table 'mytable' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. 
  </code></pre>
  
  <p>Thanks you.</p>