title: Change inserted value with trigger
body: <p>I've just started to learn SQL a few weeks ago and I'm trying to make a trigger which changes the inserted value into 10 if it's smaller than 10. I searched for 4h now and I've found a lot of answers but none was good(for me). I really don't understand where the problem is.
  Here is the code: </p>
  
  <pre><code>CREATE OR REPLACE TRIGGER NumberOfBooks
  BEFORE INSERT
  ON Book
  FOR EACH ROW
  BEGIN 
    IF new.nobook &lt; 10
    THEN
      SET new.nobook = 10;
    END IF;
    END;
  </code></pre>