LEFT

Returns the left-most substring. The function name must be enclosed in double quotes ("LEFT").

Syntax

LEFT(expression varchar, length int64) → varchar

  • expression: String input parameter

  • length: Number of characters on the left to return.

Examples

LEFT example
SELECT "LEFT"('Spice - SQL Engine', -13)
-- Spice
LEFT example
SELECT "LEFT"('Spice - SQL Engine', 5)
-- Spice

Last updated