December 2003
Beginner
648 pages
14h 1m
English
MySQL's built-in string-related functions can be used several ways. You can use functions in SELECT statements without specifying a table to retrieve a result of the function. Or you can use functions to enhance your SELECT results by concatenating two fields to form a new string.
The group of length and concatenation functions focuses on the length of strings and concatenating strings together. Length-related functions include LENGTH(), OCTET_LENGTH(), CHAR_LENGTH(), and CHARACTER_LENGTH(), which do virtually the same thing: count characters in a string.
mysql> select length('This is cool!'); +-------------------------+ | LENGTH('This is cool!') | +-------------------------+ ...Read now
Unlock full access