[MDEV-7058] ALL <subquery> BETWEEN a AND b Created: 2014-11-09 Updated: 2015-11-17 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Federico Razzoli | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
In some situations, this syntax would help:
|
| Comments |
| Comment by Sergei Golubchik [ 2014-11-10 ] |
|
This is apparently non-standard. The standard only allows ALL and ANY for <equals operator>, <not equals operator>, <less than operator>, <greater than operator>, <less than or equals operator>, <greater than or equals operator>. Don't know why, actually. Allowing BETWEEN is perfectly logical, I'd say. |
| Comment by Federico Razzoli [ 2014-11-10 ] |
|
Also, the equivalent of <subquery> BETWEEN <val1> AND <val2> is: val1 <= <subquery> AND val2 >= <subquery> which is not optimized (subquery is executed twice). And it's horribly verbose. |