Skip to main content

Combining Functions

For an SQL SELECT command containing functions, the same rules apply. For example:

SELECT SUM(salary)

FROM employee;

could return the result:


A report would look better if you created your own column headings rather than using the default. This is covered in more detail in the next section. But for now, we will keep it simple.

To specify your own heading you can give the column an alias (alternative name). Then that alternative name is used as the heading.

You specify the alias following the name of the column in the SQL SELECT command. If the heading includes spaces, or punctuation characters, then it must be enclosed in double quotes (" ...... "). It is probably easier to remember (and good practice) if you always enclose the alias in double quotes.

Next: More Functions Combined