@Test
public void testCheckSQLServerOffset(){

    String sql = SQLUtils.checkSql("select * from t where 1=1 order by X OFFSET 10 ROWS FETCH NEXT 500 ROWS ONLY", DatabaseCategory.SqlServer);
    Assert.assertEquals(
                    "SELECT *\n" +
                    "FROM (\n" +
                    "\tSELECT *, ROW_NUMBER() OVER () AS ROWNUM\n" +
                    "\tFROM t\n" +
                    "\tWHERE 1 = 1\n" +
                    "\tORDER BY X\n" +
                    "\tOFFSET 10 ROWS FETCH NEXT 500 ROWS ONLY\n" +
                    ") XX\n" +
                    "WHERE ROWNUM > 10\n" +
                    "\tAND ROWNUM <= 510"  ,sql);
}