title: SQL Delete with Inner Join ado.net
body: <p>So I have two tables:</p>
  
  <p><a href="https://i.stack.imgur.com/dXQdO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dXQdO.jpg" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/1GNU0.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1GNU0.jpg" alt="enter image description here"></a></p>
  
  <p>and I want to delete a record from <code>Kategoria-Adres</code>, where the <code>ID_Adres</code> in <code>Kategoria-Adres</code> is the same like <code>ID_Adres</code> in <code>Adres</code> when I select an item from a listbox.</p>
  
  <pre><code> string delete_string1 = "DELETE FROM Kategoria-Adres INNER JOIN Adres ON
   Kategoria-Adres.ID_Adres = Adres.ID_Adres WHERE Adres.Adres LIKE "
   + listBox1_Selected_Item + " AND Adres.ID_Adres = Kategoria-Adres.ID_Adres";
  </code></pre>
  
  <p>I've tried this, but it doesn't work for me. </p>