title: Equivalent of MSSQL with statement in MYSQL
body: <p>is there any equivalent to the following statement in mysql ?</p>
  
  <pre><code>With Tmp1 as (
          Select Distinct EmpID, TypeID 
          From tb_deductionBalance
  ), Tmp2 as (
      Select *,
         row_number() OVER ( order by empID /* no employeeID in Tmp1 */) as RowNum 
      From Tmp1
  )
  Select * From Tmp2
  Where RowNum Between @Start and @End
  </code></pre>
  
  <p>I have to migrate an mssql database to mysql and there are plenty of such statements which would take much more time to recreate in mysql if it cannot be translated.</p>
  
  <p>Thanks</p>