On this page

    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

    SELECT "LEFT"('Dremio - SQL Engine', -12)
    -- Dremio
    
    SELECT "LEFT"('Dremio - SQL Engine', 6)
    -- Dremio