title: Updating trigger in Visual Studio 2010
body: <p>I have a problem with my SQL trigger in Visual Studio 2010. I have 2 tables and I'd like to make an operation with one table on another.</p>
  
  <p>here's the code:</p>
  
  <pre><code>ALTER TRIGGER update_costs
  ON employees
  AFTER UPDATE
  AS 
  BEGIN
      UPDATE employees
      SET salary = 0
      WHERE NewSalary.ID=employees.ID
      PRINT 'Salary is now set on 0'
  
  END
  </code></pre>
  
  <p>I'd like it to work like that:</p>
  
  <ul>
  <li>I'm setting salary in NewSalary table on 0</li>
  <li>Salary in employees table is changed to 0</li>
  </ul>
  
  <p>The error I'm getting is </p>
  
  <blockquote>
    <p>"multi-part identifier "NewSalary.ID" could not be bound"</p>
  </blockquote>
  
  <p>I assume there is no "inner join" but i don't know how to use it</p>