Barney Boisvert wrote:
>> For some reason in MySQL this braindead syntax is allowed, but
>> even the manual says the result may be 'unpredictable'
>
> It's not totally brain dead.

I disagree :)

> I agree that if you don't know what you're
> doing, you shouldn't use it, but it is nice where you've got a series of
> columns that you're grouping on, but one of them is unique.

If only one of them is unique, you need to normalize your data :)

But even in the case you are working with such a schema, go for
listing all the columns in the group by, especially if there is
no way of enforcing that all future data will also have those
characteristics. It is just to prone to future errors, not just
the usual errors introduced by changing code, but also errors
introduced by changing data.

Jochem
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to