Using Functions

Most SQL implementations support the following types of functions:

  • Text functions are used to manipulate strings of text (for example, trimming or padding values and converting values to upper and lowercase).

  • Numeric functions are used to perform mathematical operations on numeric data (for example, returning absolute numbers and performing algebraic calculations).

  • Date and time functions are used to manipulate date and time values and to extract specific components from these values (for example, returning differences between dates, and checking date validity).

  • System functions return information specific to the DBMS being used (for example, returning user login information).

In the last lesson, you saw a function used as part ...

Get Sams Teach Yourself SQL in 10 Minutes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.