SQL provides more, much more, than the aggregate functions discussed in the previous article. This time around, I'll start to explore the scalar functions.
Written by Rafael Victória-Pereira
There are many scalar functions, ranging from trig functions (yes, they do exist in SQL) to date- and time-handling functions. I'll start with a few scalar functions that allow you to convert almost anything to a string.
By definition, a scalar function takes input argument(s) and returns a single value result. A scalar function can be used wherever an expression can be used (for instance, the Select, Where, or Group By clauses of a Select statement).