diff --git a/src/query-compiler/default-query-compiler.ts b/src/query-compiler/default-query-compiler.ts index e8d7a7a17..5f0633fb2 100644 --- a/src/query-compiler/default-query-compiler.ts +++ b/src/query-compiler/default-query-compiler.ts @@ -907,9 +907,11 @@ export class DefaultQueryCompiler } this.append('unique') + if (node.nullsNotDistinct) { this.append(' nulls not distinct') } + this.append(' (') this.compileList(node.columns) this.append(')')