LENGTH(<StringExpression>|<BinaryExpression>)
<StringExpression> =
Type of:
CHARACTER|CHAR
CHARACTER VARYING|VARCHAR
GUID
CHARACTER LARGE OBJECT|CLOB
<BinaryExpression> =
Type of:
BYTE
BYTE VARYING|VARBYTE
BINARY LARGE OBJECT|BLOB
Returns
INTEGER
UsageThe LENGTH function returns the length of a string or binary value as an integer value.
Examples
SELECT Notes, LENGTH(Notes) AS NumChars
FROM Customers
SQL 2003 Standard DeviationsThis function deviates from the SQL 2003 standard in the following ways: