title: ROW_NUMBER Without ORDER BY
body: <p>I've to add row number in my existing query so that I can track how much data has been added into Redis. If my query failed so I can start from that row no which is updated in other table. </p>
  
  <p>Query to get data start after 1000 row from table </p>
  
  <pre><code>SELECT * FROM (SELECT *, ROW_NUMBER() OVER (Order by (select 1)) as rn ) as X where rn &gt; 1000
  </code></pre>
  
  <p>Query is working fine. If any way that I can get the row no without using order by.</p>
  
  <p>What is <code>select 1</code> here?</p>
  
  <p>Is the query optimized or I can do it by other ways. Please provide the better solution.</p>