From: Date: July 18 2003 4:28pm Subject: Re: join query result difference between 3.23.49 and 4.0.13 List-Archive: http://lists.mysql.com/mysql/145527 Message-Id: <5pcluxi4s.ln2@blend.ensita.net> "Rudy Metzger" wrote: > Better ifnull(sum(amount_paid),0) Yes, you are right. > > Because if you add up a column which contains NULL and NOT NULL values, > all NULL values are SKIPPED for the calculation. > > This implies that if the column ONLY contains NULL values, the result is > NULL. > > Would be great if MySQL could post a chart somewhere of how they treat > NULL values in calculations. Until then, check the release notes for > every release concerning NULLs. And also the known bugs/future releases. > > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ Victoria.Reznichenko@stripped /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com