Here is a list of string functions available in MySQL.
- ASCII: This gives out the ASCII value for the specific character.
- CHAR_LENGTH: This gives out the length of the string.
- CHARACTER_LENGTH: This too gives out the length of a string.
- CONCAT: This function adds two or more expressions same together.
- CONCAT_WS: This function adds one or more expressions together followed by a separator.
- FIELD: This one returns the index of a value in a list of values.
- FIND_IN_SET: This function returns the position of a string within list of strings
- FORMAT: This function formats a number like "*,***,***.**", rounded to a specified number of decimal places.
- INSERT: This function inserts a string within a string at the targeted position and for a certain number of characters
- INSTR: This function returns the exact position of the first occurrence of a string in another string
- LCASE: This function converts string to lower-case
- LEFT: This function extracts characters from a string from the left side.
- LENGTH: This function returns the precise length of a string usually in bytes.
- LOCATE: This function returns the position of the first occurrence of a substring in a string
- LOWER: This function converts a string to lower-case
- LPAD: This function Left-pads a string with another string.
- LTRIM: This function removes leading trail spaces from a string
- MID: This one extracts a substring from a string from any place.
- POSITION: This one returns the position of the first occurrence of a substring in a string.
- REPEAT: This function repeats a string as many times as specified.
- REPLACE: This function replaces occurrences of a substring within a string with a new substring.
- REVERSE: This function reverses a string.
- RIGHT: This function extracts characters from a string from right side.
- RPAD: This function right-pads a string with another string.
- RTRIM: This one removes trailing spaces from string.
- SPACE: This function returns string of the specified number of space characters.
- STRCMP: This compares two strings.
- SUBSTR: This function extracts substring from a string from any place.
- SUBSTRING: This function extracts substring from a string from any position.
- SUBSTRING_INDEX: This one returns a substring of a string before delimiter occurs according to the specified number.
- TRIM: This function eliminates leading and trailing spaces from a string.
- UCASE: This function converts a string to upper-case
- UPPER: This also converts a string to upper-case
Related Content
Tags