title: Does 'select distinct' returns the first distinct value or last distinct?
body: <p>When I query </p>
  
  <pre><code>select distinct Name from Emp;
  </code></pre>
  
  <p><strong>Emp Table</strong></p>
  
  <pre>
  ID   Name
  1    Sam
  2    Tom
  3    Sam
  </pre>
  
  <p>does this query return first distinct name(with ID=1) from duplicate names or last distinct name(with ID=3)</p>
  
  <p>How the distinct keyword actually works in this context?</p>