title: delete duplicate rows SQL Server
body: <p>i have column and rows in my table as below</p>
  
  <pre><code>col1  col2  col3  col4
  -----------------------
  A     1     100   AA
  B     2     200   BB
  B     1     100   AA
  A     2     200   BB
  </code></pre>
  
  <p>col2, col3 and col4 have duplicate rows, but not in col1. i want the final result is</p>
  
  <pre><code>col1  col2  col3  col4
  -----------------------
  A     1     100   AA
  B     2     200   BB
  </code></pre>
  
  <p>i've tried this queries, but not Working</p>
  
  <pre><code>DELETE aliasName FROM 
  (
      SELECT *, ROW_NUMBER() OVER (
        PARTITION BY col1,col2,col3,col4 ORDER BY col1
      ) AS rowNumber FROM Table) aliasName
  WHERE rowNumber &gt; 1
  </code></pre>
  
  <p>if i remove the PARTITION BY col1, the result is</p>
  
  <pre><code>col1  col2  col3  col4
  -----------------------
  A     1     100   AA
  A     2     200   BB
  </code></pre>
  
  <hr>
  
  <p>this my real table result is</p>
  
  <pre><code>JSP/14/06/2017/1810759183   SRK/14/06/2017/1265996087   JS_43345.43556  BB  20000   1
  JSP/14/06/2017/800205939    SRK/14/06/2017/2089009939   JS_43345.43556  BB  20000   1
  </code></pre>