title: MySQL table was specified twice?
body: <p>Why I got an error when try to execute this query:</p>
  
  <pre><code>UPDATE ordersperformers AS t1 SET t1.Status = 1 
  where not exists (
  SELECT 1 FROM ordersperformers 
     WHERE ordersperformers.Orders_Id = 3 
      AND (ordersperformers.Status = 1 OR ordersperformers.Status = 2))
      AND t1.Orders_Id = 3 AND t1.Users_Id = 5;
  </code></pre>
  
  <p>Why MySQL does not realize that I work with table <code>ordersperformers</code>?</p>
  
  <p>Error is:</p>
  
  <blockquote>
    <p><code>#1093 - Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data</code>.</p>
  </blockquote>
  
  <p>If execute query:</p>
  
  <pre><code>UPDATE ordersperformers SET Status = 1 
  where  ordersperformers.Status NOT IN (1,2)
  AND Orders_Id = 3;
  </code></pre>
  
  <p>It will update anyway one row:</p>
  
  <p><a href="https://i.stack.imgur.com/sM17u.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sM17u.png" alt="enter image description here"></a></p>
  
  <p>But I dont need update any rows cause table with <code>Orders_Id = 3</code> has one row with <code>Status = 1</code></p>