[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Select and =MAX()
Jorge
When I issue your suggested commands here are the resulted rows..
mysql> SELECT price
-> FROM shop
-> HAVING price=MAX(price);
Empty set (0.01 sec)
But when I issue...
mysql> select price from shop order by price desc;
+-------+
| price |
+-------+
| 19.95 |
| 10.99 |
| 3.99 |
| 3.45 |
| 1.69 |
| 1.45 |
| 1.25 |
+-------+
7 rows in set (0.01 sec)
Why??
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <mysql-thread77885@xxxxxxxxxxxxxxx>
To unsubscribe, e-mail <mysql-unsubscribe-treed=ultraviolet.org@xxxxxxxxxxxxxxx>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
This mailing list archive is a service of Copilot Consulting.