O'Reilly logo

MySQL in a Nutshell by Russell J.T. Dyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

String Functions Grouped by Type

The list of string functions is quite long, but many perform similar roles. The following list groups the functions by these roles.

Converting

ASCII( ), BIN( ), BINARY( ), CHAR( ), COMPRESS( ), CONV( ), EXPORT_SET( ), HEX( ), INET_ATON( ), INET_NTOA( ), MAKE_SET( ), OCT( ), ORD( ), SOUNDEX( ), UNCOMPRESS( ), UNHEX( )

Formatting

CONCAT( ), CONCAT_WS( ), LCASE( ), LENGTH( ), LOWER( ), LPAD( ), LTRIM( ), OCTET_LENGTH( ), QUOTE( ), RPAD( ), RTRIM( ), SPACE( ), TRIM( ), UCASE( ), UPPER( )

Expressions

BIT_LENGTH( ), CHAR_LENGTH( ), CHARACTER_LENGTH( ), ELT( ), FIELD( ), FIND_IN( ), INSTR( ), LOCATE( ), MATCH( ), AGAINST( ), POSITION( ), STRCMP( ), SUBSTRING_INDEX( ), UNCOMPRES_LENGTH()

Extracting

LEFT( ), LOAD_FILE( ), MID( ), RIGHT( ), SUBSTRING( )

Manipulating

INSERT( ), REPEAT( ), REPLACE( ), REVERSE( )

Security

DECODE( ), ENCODE( ), ENCRYPT( ), MD5( ), PASSWORD( )

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required