title: How to sort sql query without primary key?
body: <p>I have table called articles_tags which have two columns:</p>
  
  <ul>
  <li>article_id</li>
  <li>tag_id</li>
  </ul>
  
  <p>(has_and_belongs_to_many association) (I implemented this with php)</p>
  
  <p>I want to find the last article_id that entered to db, so i tried to do:</p>
  
  <pre><code>SELECT `article_id` FROM `articles_tags`  ORDER BY `article_id` DESC LIMIT 1
  </code></pre>
  
  <p>The first problem is that i don't want sort by article_id, and the second one is that it doesn't work.</p>
  
  <p>i think because i don't have primary key in this table.</p>