[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:

ALL <subquery> BETWEEN a AND b



 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.

Generated at Thu Feb 08 07:16:38 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.