title: Error #1109 in MySql
body: <p>This is my trigger.</p>
  
  <p>I want to make trigger on 1 table (rezervare).</p>
  
  <p><a href="https://i.stack.imgur.com/PUHuF.png" rel="nofollow noreferrer">Trigger</a></p>
  
  <pre><code>DELIMITER //
  CREATE TRIGGER verificare_nr_locuri
  BEFORE INSERT ON Rezervare
  FOR EACH ROW 
  BEGIN
      IF ( SELECT Masa.NrLocuri FROM Rezervare, Masa 
      WHERE Masa.NumarMasa = Rezervare.NumarMasa ) &lt; Rezervare.NumarPersoane THEN 
          SET NEW.NumarMasa = NULL;
      END IF;
  END //
  DELIMITER ;
  
  INSERT INTO Rezervare VALUES (123,106,2,'2016-12-11','2016-12-24',5);
  INSERT INTO Rezervare VALUES (124,106,2,'2016-12-11','2016-12-24',4);
  </code></pre>
  
  <p>When I execute the trigger, it has been created. But, when I insert data into table rezervare, It become </p>
  
  <pre><code>#1109 - Unknown table 'rezervare' in field list.
  </code></pre>
  
  <p>How can I resolve this?</p>
  
  <p><a href="https://gyazo.com/f3309002bf7aeb3d55a9a520794d5321" rel="nofollow noreferrer">Table</a></p>