6. MySQL Functions

MySQL has dozens of built-in functions that are designed to simplify common tasks. I’ll cover the most useful ones here, but don’t be surprised if you find that MySQL has added others in newer versions of the software. In my personal opinion, it’s the functions that make querying a database so useful (SQL by itself is too vanilla).

Most of the functions you’ll learn in this chapter are used in conjunction with SQL queries to format and alter the returned data. As in the preceding chapter, every example will be demonstrated from within the mysql client. Each example will be based upon the existing accounting database and be used to illustrate common database techniques.

Text Functions

The first group of functions I will demonstrate ...

Get MySQL, Second Edition: Visual Quickstart Guide 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.