The 'sqlsrv' query objects have no additional methods specific to Microsoft SQL
Server. However, limit() and offset() behaviors are somewhat modified.
In general, limit() and offset() with Microsoft SQL Server are best
combined with orderBy(). The limit() and offset() methods on the
Microsoft SQL Server query objects will generate sqlsrv-specific variations of
LIMIT ... OFFSET:
-
If only a
LIMITis present, it will be translated as aTOPclause. -
If both
LIMITandOFFSETare present, it will be translated as anOFFSET ... ROWS FETCH NEXT ... ROWS ONLYclause. In this case there must be anORDER BYclause, as the limiting clause is a sub-clause ofORDER BY.