Skip to content

Returns the leftmost len characters from the string str, or NULL if any argument is NULL.

func.left(<str>, <len>)
func.left('foobarbar', 5)
┌───────────────────────────┐
│ func.left('foobarbar', 5) │
├───────────────────────────┤
│ fooba │
└───────────────────────────┘
LEFT(<str>, <len>);
ArgumentsDescription
<str>The main string from where the character to be extracted
<len>The count of characters

VARCHAR

SELECT LEFT('foobarbar', 5);
┌──────────────────────┐
LEFT('foobarbar', 5) │
├──────────────────────┤
│ fooba │
└──────────────────────┘