0% found this document useful (0 votes)
31 views

Func SQL

This document discusses SQL functions that can perform calculations on data. It describes aggregate functions such as AVG(), COUNT(), and SUM() that return a single value calculated from column values. It also describes scalar functions like UCASE(), LCASE(), and MID() that return a single value based on an input value and are useful for manipulating text fields. The next chapters will provide more details on aggregate and scalar functions.

Uploaded by

cheptene
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Func SQL

This document discusses SQL functions that can perform calculations on data. It describes aggregate functions such as AVG(), COUNT(), and SUM() that return a single value calculated from column values. It also describes scalar functions like UCASE(), LCASE(), and MID() that return a single value based on an input value and are useful for manipulating text fields. The next chapters will provide more details on aggregate and scalar functions.

Uploaded by

cheptene
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

SQL Functions

Previous Next Chapter


SQL has many built-in functions for performing calculations on data.

SQL Aggregate Functions


SQL aggregate functions return a single value, calculated from values in a column. Useful aggregate functions:

AVG() - Returns the average value COUNT() - Returns the number of rows FIRST() - Returns the first value LAST() - Returns the last value MAX() - Returns the largest value MIN() - Returns the smallest value SUM() - Returns the sum

SQL Scalar functions


SQL scalar functions return a single value, based on the input value. Useful scalar functions:

UCASE() - Converts a field to upper case LCASE() - Converts a field to lower case MID() - Extract characters from a text field LEN() - Returns the length of a text field ROUND() - Rounds a numeric field to the number of decimals specified NOW() - Returns the current system date and time FORMAT() - Formats how a field is to be displayed

Tip: The aggregate functions and the scalar functions will be explained in details in the next chapters.

You might also like