title: Advanced SQL Update query
body: <p>I'm trying to create a sql update query for a stored procedure but I'm getting lost in trying to figure out how to to do it.  </p>
  
  <p>Here is what I'm trying do:</p>
  
  <p>The table I'm wanting to update has 3 columns: product_item_id, rel_product_item_id, and sequence. This table is called "ProductRelationship". </p>
  
  <p>I also have another table called ProductDetails.  This table also contains a column called product_item_id as well as a column called "sku".</p>
  
  <p>I want the user to be able input the sku number that updates the rel_product_item_id column with the corresponding product_item_id number from the ProductDetails table.</p>
  
  <p>So on the front-end, the user is inputting a sku, but in the backend, the product_item_id number is getting updated in the database based on the sku the user entered.</p>
  
  <p>Basically its cross-referencing the sku number on the details table, finding the appropiate product item id number and inserting that id number in the table instead of the user-inputted sku number.</p>