question about select count(*) with group by

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


suppose a hypothetical table called 'table' with one field called 'field' of
an arbitrary type.

the query

select count(*) from table where field='value' group by field

produces no rows when run under the latest mysql. without "group by" it
produces 1 row.

is this according to the SQL standard or is this just a coincidence? in
other words, can i rely on this behaviour to deduce that there are no fields
with value 'value' in 'table'?


Site Timeline