A column function consists of the function name, followed by a pair of parentheses. Inside the parentheses is an argument, which is a column name, literal, scalar function or a combination of these. For example:
SELECT AVG(PRICE) FROM INVENTORY_TBL
                                               or
SELECT MIN(YEAR(HIRE_DATE),4,0)
FROM EMPLOYEE_TBL
If the argument is a decimal column, then the result is decimal. If the argument is integer, then the result is integer and any fractional part is lost. The result of a column function does not have a heading in the result table, because it is not an existing and unmodified column in the base table.
If you use the keyword, DISTINCT, with a column function, then SQL will eliminate duplicate values before the column function is performed. Then the column function will be performed on every unique value that is SELECTed or is in the WHERE condition, rather than with the duplicate values.
NULL values are not considered in the calculation of a column function, except COUNT(*). Any NULL values are removed before the column function is performed. If these values are to be counted, then the column must be defined as NOT NULL, so that a default value of zeroes or spaces will be used in the column function. Alternatively, you can use COALESCE() in a column function to substitute a value for a null.
> DB2 & SQL Server omit the key word DATE, TIME, and TIMESTAMP ahead of the literal.
> Access surrounds date-time literals with the pound sign (#), so that the standard SQL date
DATE ‘2056-02-20′ is the same as the Access’s #2056-02-20#.
Â