Appendix B. Scalar Functions

SQL supports a large number of scalar functions. In this appendix, we present the following for the functions supported by many SQL products: the name, a description, the data type of the result of the function, and a few examples. The functions are sorted by name.

Some functions have more than one name. To make the search easier, we have included them all, but we refer to the functions with the same name.

ABS(par1)

Description: This function returns the absolute value of a numeric expression.

Data type: Numeric

ABS(-25)    ⇨ 25
ABS(-25.89) ⇨ 25.89

ACOS(par1)

Description: This function returns, in radians, the angle size for any given arc cosine value. The value of the parameter must lie between -1 and 1 inclusive.

Data type: ...

Get Introduction to SQL: Mastering the Relational Database Language, Fourth Edition/20th Anniversary Edition 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.