MySQL Function Reference

LPAD
Returns a string left padded with another string to the specified length
MySQL 8.1
LPAD(str, len, pad_str)
str
Source string
len
The length of the string to which the string will be padded
pad_str
The string to be padded with the original string
Examples
MySQL 8.1
SELECT LPAD('9', 5, '0')