숫자 관련 함수
ROUND
CEIL
FLOOR
SELECT ROUND(price) FROM products;
ABS
SELECT ABS(-1);
GREATEST
LEAST
SELECT GREATEST(1, 24, 100);
MAX
MIN
COUNT
SUM
AVG
POW(A, B) or POWER(A, B)
SQRT 제곱근
TRUNCATE(N, n)
TRUNCATE(1234.5678, 2)
TRUNCATE(1234.5678, -2)
TRUNCATE(1234,5678, 0)
문자열 관련 함수
UCASE or UPPER
LCASE or LOWER
CONCAT
CONCAT_WS(S, ...)
SELECT CONCAT_WS('_', 2021, 09, 13);
SUBSTR or SUBSTRING
LEFT
RIGHT
SELECT SUBSTRING('ABCDEF',3, 2), SUBSTRING('ABCDEF',-4, 2);
LENGTH
CHAR_LENGTH or CHARACTER_LENGTH
TRIM
LTRIM
RTRIM
LPAD(S, N, P)
RPAD(S, N, P)
SELECT LPAD('ABC', 5, '-')
SELECT RPAD('ABC', 5, '-')
REPLACE(S, A, B)
SELECT REPLACE('오늘은 하체 내일은 등', '하체', '가슴');
INSTR(S, s)
SELECT INSTR('ABCDFG', 'AB');
SELECT INSTR('ABCDFG', 'GH');
참고자료
https://youtu.be/dgpBXNa9vJc