title: How to make unique combination of columns values?
body: <p>I have a table with data like this:</p>
  
  <pre><code>id |  link  |  name  | date 
   1     aa      bob      1
   1     aa      tom      2
   1     bb      tom      3
   2     cc      lora     4
  </code></pre>
  
  <p>It means I can have not unique values in any column but I CAN'T have the same row with identical <code>id</code> <code>link</code> <code>name</code> (date doesn't matter). This is the example what I can't have:</p>
  
  <pre><code> id |  link  |  name  |  date 
    1     aa       bob      1
    1     aa       bob      2
  </code></pre>
  
  <p>I tried to:</p>
  
  <pre><code>ALTER TABLE table ADD UNIQUE KEY `uk_id_link_name` (id, link, name);
  </code></pre>
  
  <p>also:</p>
  
  <pre><code>ALTER TABLE `table` ADD UNIQUE `unique_index`(`id`, `link`, `name`);
  </code></pre>
  
  <p>But it gives me an error:</p>
  
  <blockquote>
    <p>Duplicate entry</p>
  </blockquote>
  
  <p>How to make unique rows (combination of columns values which is not unique)?</p>
  
  <p><strong>EDIT:</strong> I don't want to delete duplicates from table.</p>