Skip to main content

Categories: String

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"('Dremio - SQL Engine', -12)
-- Dremio
LEFT example
SELECT "LEFT"('Dremio - SQL Engine', 6)
-- Dremio