MySQL Forums
Forum List  »  Stored Procedures

Re: Loop repeat the last line (last entry of the cursor)
Posted by: Peter Brawley
Date: July 19, 2013 03:12PM

Invalid query: select *, ... group by nome_aluno will return arbitrary results for every non-aggregated column except nome_aluno that does not have a strictly 1:1 relationship with alone_nome.

In general, avoid Select * ... Group By ....

Decide which columns you must Group By, and include only those columns in the Select statement. If you need other non-aggregated columns, retrieve them from a Join to the aggregation query.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Loop repeat the last line (last entry of the cursor)
1077
July 19, 2013 03:12PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.