diff --git a/internal/statements/legacy_select.go b/internal/statements/legacy_select.go index c6fd86b7..23a749a7 100644 --- a/internal/statements/legacy_select.go +++ b/internal/statements/legacy_select.go @@ -19,8 +19,9 @@ func (statement *Statement) isUsingLegacyLimitOffset() bool { func (statement *Statement) writeMssqlLegacySelect(buf *builder.BytesWriter, columnStr string) error { return statement.writeMultiple(buf, statement.writeStrings("SELECT"), - statement.writeDistinct, statement.writeTop, + statement.writeDistinct, + statement.writeStrings(" ", columnStr), statement.writeFrom, statement.writeWhereWithMssqlPagination, statement.writeGroupBy,