The query
SQL> select min(1) from tbl where 1=0;
MIN(1)
returns one row with NULL. 2 questions:
- Is it SQL standard?
- Is it for any reason better than retuning minimal number in the numeric
domain? (Same for dates, strings and other domains with total ordering). Every
aggregate function internally starts a loop with some value (for example, sum
starts with 0), and that value is the intuitive result of quering the empty set.
Besiades, in order to find out the min/max numbers in the domain I would have to
make one less trip to the documnetation;-)
Received on Tue Nov 06 2001 - 12:02:17 CST