The SUM function returns the sum of all the values in the specified column or expression, as the following example shows. If you use the DISTINCT keyword, the sum is for only distinct values in the column or expression:
SELECT SUM(total_price) FROM items WHERE order_num = 1013
NULL values are ignored unless every value in the column is NULL. If every column value is NULL, the SUM function returns a NULL for that column. You cannot use the SUM function with a non-numeric column.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]