MySQL String Functions

Created with Sketch.

MySQL String Functions

This page shows you the most commonly used MySQL string functions that allow you to manipulate character string data effectively.

NameDescription
CONCATConcatenate two or more strings into a single string
INSTRReturn the position of the first occurrence of a substring in a string
LENGTHGet the length of a string in bytes and in characters
LEFTGet a specified number of leftmost characters from a string
LOWERConvert a string to lowercase
LTRIMRemove all leading spaces from a string
REPLACESearch and replace a substring in a string
RIGHTGet a specified number of rightmost characters from a string
RTRIMRemove all trailing spaces from a string
SUBSTRINGExtract a substring starting from a position with a specific length.
SUBSTRING_INDEXReturn a substring from a string before a specified number of occurrences of a delimiter
TRIMRemove unwanted characters from a string.
FIND_IN_SETFind a string within a comma-separated list of strings
FORMATFormat a number with a specific locale, rounded to the number of decimals
UPPERConvert a string to uppercase

Leave a Reply

Your email address will not be published.