FirebirdSQL logo

LEFT()

Extracts the leftmost part of a string

Result type

VARCHAR or BLOB

Syntax
LEFT (string, length)
Table 1. LEFT Function Parameters
Parameter Description

string

An expression of a string type

length

Integer expression.The number of characters to return

  • This function fully supports text BLOBs of any length, including those with a multi-byte character set.

  • If string is a BLOB, the result is a BLOB.Otherwise, the result is a VARCHAR(n) with n the length of the input string.

  • If the length argument exceeds the string length, the input string is returned unchanged.

  • If the length argument is not a whole number, bankers' rounding (round-to-even) is applied, i.e. 0.5 becomes 0, 1.5 becomes 2, 2.5 becomes 2, 3.5 becomes 4, etc.

LOWER()

Converts a string to lowercase

Result type

(VAR)CHAR, (VAR)BINARY or BLOB

Syntax
LOWER (string)
Table 1. LOWER Function ParameterS
Parameter Description

string

An expression of a string type

Returns the lowercase equivalent of the input string.The exact result depends on the character set.With ASCII or NONE for instance, only ASCII characters are lowercased;with character set OCTETS/(VAR)BINARY, the entire string is returned unchanged.