tried it.same results. records with null groupids are grouped together.
someone advised to use UNION:
SELECT * FROM table WHERE groupID IS NOT NULL GROUP BY groupID
UNION
SELECT * FROM table WHERE groupID IS NULL
works but only for mysql versions 4.x.x
our server has mysql v3.x.x. so i...
I have a table of items each having a field called groupID. In the table, there are items having the same groupID but most have null groupIDs. I want to be able to do a SELECT query GROUPING the items by groupID and also want to return all items having null groupIDs. What happens is that all...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.