single row functions
CONCAT(): Concatenates two or more strings together.
- Syntax:
SELECT CONCAT(string1, string2, ...);
LENGTH(): Returns the length of a string in bytes.
- Syntax:
SELECT LENGTH(string);
LOWER(): Converts a string to lowercase.
- Syntax:
SELECT LOWER(string);
UPPER(): Converts a string to uppercase.
- Syntax:
SELECT UPPER(string);
SUBSTRING(): Extracts a substring from a string.
- Syntax:
SELECT SUBSTRING(string, start, length);
LEFT(): Extracts the leftmost characters of a specified length.
- Syntax:
SELECT LEFT(string, length);
RIGHT(): Extracts the rightmost characters of a specified length.
- Syntax:
RIGHT(string, length);
ROUND(): Rounds a number to a specified number of decimal places.
- Syntax:
SELECT ROUND(number, decimals);
CEIL(): Returns the smallest integer greater than or equal to the given number.
- Syntax:
SELECT CEIL(number);
FLOOR(): Returns the largest integer less than or equal to the given number.
- Syntax:
SELECT FLOOR(number);
YEAR(): Extract the year.
- Syntax:
SELECT YEAR(date_value);
MONTH(): Extract the month
- Syntax:
SELECT MONTH(date_value);
DAY():Extract the date
- Syntax:
SELECT DAY(date_value);