bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL Functions

Concept visual

MySQL Functions

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Formula

MySQL has many built - in functions.

This reference contains string, numeric, date, and some advanced functions in MySQL.

MySQL String Functions

Function

Description

Ascii

Returns the ASCII value for the specific character CHAR_LENGTH Returns the length of a string (in characters) CHARACTER_LENGTH Returns the length of a string (in characters)

Concat

Adds two or more expressions together

CONCAT_WS Adds two or more expressions together with a separator

Field

Returns the index position of a value in a list of values FIND_IN_SET Returns the position of a string within a list of strings

Format

Formats a number to a format like "#,###,###.##", rounded to a specified number of decimal places

Insert

Inserts a string within a string at the specified position and for a certain number of characters

Instr

Returns the position of the first occurrence of a string in another string

Lcase

Converts a string to lower-case

Left

Extracts a number of characters from a string (starting from left)

Length

Returns the length of a string (in bytes)

Locate

Returns the position of the first occurrence of a substring in a string

Lower

Converts a string to lower-case

Lpad

Formula

Left - pads a string with another string, to a certain length

Ltrim

Removes leading spaces from a string

Mid

Extracts a substring from a string (starting at any position)

Position

Returns the position of the first occurrence of a substring in a string

Repeat

Repeats a string as many times as specified

Previous

SQL WHERE Keyword

Next

MySQL ASCII() Function