What are Aggregate and Scalar Functions available in SQL?

Ankur Kulhari

Aggregate and Scalar functions are in built function for counting and calculations.

Aggregate functions operate against a group of values but returns only one value.

AVG(column):- Returns the average value of a column

COUNT(column):- Returns the number of rows (without a NULL value) of a column

COUNT(*):- Returns the number of selected rows

MAX(column):- Returns the highest value of a column

MIN(column):- Returns the lowest value of a column

Scalar functions operate against a single value and return value on basis of the single value.

UCASE(c):- Converts a field to upper case

LCASE(c):- Converts a field to lower case

MID(c,start[,end]):- Extract characters from a text field

LEN(c):- Returns the length of a text.

What do you think about the article?

This site uses Akismet to reduce spam. Learn how your comment data is processed.