diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py
a
|
b
|
|
116 | 116 | |
117 | 117 | if with_limits: |
118 | 118 | if self.query.high_mark is not None: |
119 | | result.append('LIMIT %d' % (self.query.high_mark - self.query.low_mark)) |
| 119 | if self.query.high_mark != self.query.low_mark: |
| 120 | result.append('LIMIT %d' % (self.query.high_mark - self.query.low_mark)) |
| 121 | else: |
| 122 | return '', () |
120 | 123 | if self.query.low_mark: |
121 | 124 | if self.query.high_mark is None: |
122 | 125 | val = self.connection.ops.no_limit_value() |