Molding The Data You Retrieve

Introduction

Functions in SQL enable you to perform feats such as determining the sum of a column or converting all the characters of a string to
uppercase.

Aggregate Functions

These functions are also referred to as group functions. They return a value based on
the values in a column.

COUNT

The function COUNT returns the number of rows that satisfy the condition in the WHERE
clause.

SUM

SUM returns the sum of all values in a column.

AVG

The AVG function computes the average of a column.

MAX

If you want to find the largest value in a column, use MAX.

MIN

MIN returns the lowest member of a column.

VARIANCE

VARIANCE produces the square of the standard deviation,

Date and Time Functions

ADD_MONTHS

This function adds a number of months to a specified date.

LAST_DAY

LAST_DAY returns the last day of a specified month.

MONTHS_BETWEEN

To know how many months fall between month x and month y.

Arithmetic Functions

Many of the uses you have for the data you retrieve involve mathematics.

ABS

The ABS function returns the absolute value of the number you point to.

Character Functions

Many implementations of SQL provide functions to manipulate characters and strings of
characters.

Conversion Functions

These three conversion functions provide a handy way of converting one type of data to
another.

Miscellaneous Functions

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.