Skip to main content

LEFT

Description​

Returns the substring starting at the specified offset from the left side of string s.

Syntax​

LEFT ( <str> , <offset> )

Parameters​

ParameterDescription
<str>String to search for
<offset>Offset to calculate from the left side

Return Value​

The substring starting at the specified offset from the left side of string <str>.

Example​

SELECT LEFT('Hello', 3)
+------------------+
| left('Hello', 3) |
+------------------+
| Hel |
+------------------+