in reply to DBI and selecting aggregate columns with no results
mysql> create table foo (i int); Query OK, 0 rows affected (0.14 sec) mysql> insert into foo values (1), (2), (3); Query OK, 3 rows affected (0.00 sec) Records: 3 Duplicates: 0 Warnings: 0 mysql> select * from foo where i = 42; Empty set (0.04 sec) mysql> select min(i) from foo where i = 42; +--------+ | min(i) | +--------+ | NULL | +--------+ 1 row in set (0.04 sec) mysql> select min(i) from foo where 1 = 0; +--------+ | min(i) | +--------+ | NULL | +--------+ 1 row in set (0.00 sec)
|
|---|