Mysql version 8.0, distrib 3.22.32
select (1 < 5 < 3) = 1
select ((1<5) < 3) = 1
select (1< (5 < 3)) = 0
In this version, apparently left to right.
Regards,
Rich
At 05:16 PM 6/14/01 +0100, Jon Haworth wrote:
> > And why do you think it should return 0 ?
> >
> > ( 1 < 5 ) returns 1.
> > ( 1 < 3
> And why do you think it should return 0 ?
>
> ( 1 < 5 ) returns 1.
> ( 1 < 3 ) returns 1.
> ( 1 < 5 < 3 ) should then return 1.
>
> Or am I missing something?
>
I think probably becuse ( 5 < 3 ) returns 0.
Depends how you read it, either as "1 is less than 5 and less than 3" or "1
is less t
nsabbi wrote:
> mysql> select (1 < 5 < 3);
> +-+
> | (1 < 5 < 3) |
> +-+
> | 1 |
> +-+
> 1 row in set (0.00 sec)
>
>
> mysql> select (1 < 5 and 5 < 3);
> ++
> | (1 < 5 and 5 < 3) |
> ++
> | 0
mysql> select (1 < 5 < 3);
+-+
| (1 < 5 < 3) |
+-+
| 1 |
+-+
1 row in set (0.00 sec)
mysql> select (1 < 5 and 5 < 3);
++
| (1 < 5 and 5 < 3) |
++
| 0 |
++
1 row in set (0.0