question about select count(*) with group by

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • konsu

    question about select count(*) with group by

    hello,

    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'?

    thanks
    konstantin


Working...