Understanding Functions

Like almost any other computer language, SQL supports the use of functions to manipulate data. Functions are operations that can be performed on data, usually to facilitate conversion and manipulation.

An example of a function is the RTRIM() that we used in the last lesson to trim any spaces from the end of a string.

The Problem with Functions

Before you work through this lesson and try the examples, you should be aware that using SQL functions can be highly problematic.

Unlike SQL statements (for example, SELECT), which for the most part are supported by all DBMSs equally, functions tend to be very DBMS specific. In fact, very few functions are supported identically by all major DBMSs. Although all types of functionality ...

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.