Warning: Creating default object from empty value in /www/htdocs/v030397/mysql-qotd/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 4991
Warning: Creating default object from empty value in /www/htdocs/v030397/mysql-qotd/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 4993
Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/v030397/mysql-qotd/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php:4991) in /www/htdocs/v030397/mysql-qotd/wp-includes/feed-rss2-comments.php on line 8 Comments on: Question 26: Given the situation below, what is the result of the following query?
http://mysql-qotd.casperia.net/archives/218
mysql 5.0/5.1 questions for learning purposesFri, 06 Aug 2010 16:56:36 +0000http://wordpress.org/?v=abchourly1By: urs
http://mysql-qotd.casperia.net/archives/218/comment-page-1#comment-32
ursMon, 22 Feb 2010 16:08:38 +0000http://mysql-qotd.casperia.net/?p=218#comment-32<b>
Answer:
b
Summing up a group with nulls is valid and only the not-null values will be included. <code>SUM()</code> will return <code>NULL</code> if there are no rows to process. When grouping by a field which can contain nulls, then <code>NULL</code> acts like one of the field's distinct values.
</b>
Answer:
b
Summing up a group with nulls is valid and only the not-null values will be included. SUM() will return NULL if there are no rows to process. When grouping by a field which can contain nulls, then NULL acts like one of the field’s distinct values.