title: Update table inner join
body: <p>I have two tables and i need to update one of them with respect to the id's of the second table </p>
  
  <p>first table <strong>successlog</strong>;</p>
  
  <pre><code>Id     pid      shiftid
  1       2          
  2       2          
  3       2          
  4       5          
  5       5
  6       6
  7       6   
  </code></pre>
  
  <p>second table <strong>employeelist</strong>;</p>
  
  <pre><code>Id    pId      shiftid
  1      2          1
  2      5          1
  3      6          2
  </code></pre>
  
  <p>I need to update the first table's <code>shiftid</code> with respect to the <code>pid</code> in the two tables.</p>
  
  <p>I'm using the below query but its not working;</p>
  
  <pre><code>        $sql1="UPDATE successlog
                  SET successlog.shiftid = employeelist.shiftid
                   FROM successlog
                   INNER JOIN employeelist
                   ON successlog.pid=employeelist.pId";  
  </code></pre>