I have a small mysql table (MySQL version 5.6.23) :
+-----------+-----------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+-----------------+------+-----+---------+----------------+
| id | int(6) unsigned | NO | PRI | NULL | auto_increment |
| dividends | float(8,6) | YES | | NULL | |
+-----------+-----------------+------+-----+---------+----------------+
My where clause follows the row-subqueries syntax.
If I do:
SELECT id, dividends FROM test
where (id,dividends) >= (660,0.5);
or
SELECT id, dividends FROM test
where (id,dividends) >= (660,CAST(0.5 AS DECIMAL(8,6)));
I get this result:
+-----+-----------+
| id | dividends |
+-----+-----------+
| 660 | 0.500000 |
| 661 | 0.470000 |
| 662 | 0.470000 |
| 663 | 0.470000 |
| 664 | 2.580000 |
| 665 | 2.581000 |
...
It seems to me that dividends >= 0.5 is not taken into consideration. Why?