LEFT

Learn how to use the LEFT string function in PlaidCloud Lakehouse. Returns the leftmost len characters from the string str, or NULL if any argument is NULL.

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

Analyze Syntax

func.left(<str>, <len>)

Analyze Examples

func.left('foobarbar', 5)
┌───────────────────────────┐
 func.left('foobarbar', 5) 
├───────────────────────────┤
 fooba                     
└───────────────────────────┘

SQL Syntax

LEFT(<str>, <len>);

Arguments

ArgumentsDescription
<str>The main string from where the character to be extracted
<len>The count of characters

Return Type

VARCHAR

SQL Examples

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