Length Functions (SQL)

Help Contents


Length functions typically return the length of a string.


primary-function-length ::=
  | octet-length-function

character-length-function ::=
  { CHAR_LENGTH | CHARACTER_LENGTH } '(' value-expression
  [ USING char-length-units> ] ')'

char-length-units ::=

octet-length-function ::=
  OCTET_LENGTH '(' value-expression ')'


These Length functions are supported:

CHAR_LENGTH( S )Returns the length of S in characters or octets.
CHARACTER_LENGTH( S )Returns the length of S in characters or octets.
OCTET_LENGTH( S )Returns the length of S in octets.

If the string parameter S is NULL, the above functions return NULL.

If the USING clause is omitted, CHARACTERS is assumed.

Further Information

Value Expressions (SQL)

To learn more about SQL scalar value expressions.

Fernhill SCADA Structured Query Language (SQL)

To learn more about the SQL features in Fernhill SCADA.


For the meaning of terms used in Fernhill SCADA.