title: What's wrong with this code? Issue with copying data across tables
body: <pre><code>insert into Permission (UserID, perm, Login) select UserID, 0, Login from Users
  </code></pre>
  
  <p><strong>What happens</strong>: Copy data across tables and inserts 0 as a default value for 'perm' column. However, I need to run this code every time the software creates its form. So it keeps adding everything it already have. </p>
  
  <p><strong>Workaround</strong>: DELETE FROM Permission WHERE perm=0 --before running the insert code. This will make sure not to delete users who have Perm=1 (permission to alter something).</p>
  
  <p><strong>Issue</strong>: So I run the delete code above before running the insert. But since it's a <strong>frequent</strong> routine it will <strong>double</strong> the user already contained in the table Permissions (i.e.: user Admin will have perm=0 and perm=1). Is there anyway to detect if the user already exist and skip it or something?</p>