Returns the leftmost characters in a string value, based on a specified number of characters.
- expression: a character expression of one of these types, or an expression that resolves to one of these types:
- LONG VARCHAR
- numChars: the number of characters to return, starting from the first (left) position in expression. This value should be an INTEGER.
- The same type as the input expression. Returns NULL if expression evaluates to NULL.
SELECT firstName, LEFT(firstName, 5) AS firstNameLeft5 FROM MYSQL.inventory.cust; -- VALUES LEFT('Adamson'); -- Returns 'Adams'