diff --git a/src/Database/Dialect/SqlserverDialectTrait.php b/src/Database/Dialect/SqlserverDialectTrait.php
index <HASH>..<HASH> 100644
--- a/src/Database/Dialect/SqlserverDialectTrait.php
+++ b/src/Database/Dialect/SqlserverDialectTrait.php
@@ -99,9 +99,9 @@ trait SqlserverDialectTrait
     protected function _pagingSubquery($original, $limit, $offset)
     {
         $field = '_cake_paging_._cake_page_rownum_';
+        $order = $original->clause('order') ?: new OrderByExpression('(SELECT NULL)');
 
         $query = clone $original;
-        $order = $query->clause('order') ?: new OrderByExpression('NULL');
         $query->select([
                 '_cake_page_rownum_' => new UnaryExpression('ROW_NUMBER() OVER', $order)
             ])->limit(null)
Fix incorrect default order by clause.

Instead of NULL, the ORDER BY for SQLServer needs to be a select
statement. For compatibility with SQLServer<I> this statement needs to
be wrapped in parentheses as well.

No new tests were added as a number of tests are currently failing, but
we didn't know because AppVeyor is failing due to incorrect dependencies
being installed.

Refs #<I>