Please, don't answer if you don't know the the matter.
- This is not correct SQL. An ORDER BY must come after a
GROUP BY clause
- Even if you find a DBMS that runs it, it will produce
a CROSS JOIN, i.e. a result set with as many records in table1
multiply by as many records in table2.
As for the original question, I am unable to answer
because it is not clear to me if a member has many counties
or a county has many members. The OP would be better off by
asking this at comp.databases.
| [reply] |
Even if you find a DBMS that runs it, it will produce a CROSS JOIN, i.e. a result set with as many records in table1 multiply by as many records in table2.
This is also known as a cartesian product. The query will produce that because there is no join information - i.e. no implicit link between the two tables in the WHERE clause, and no JOIN clause.
Michael
| [reply] |