Thursday, January 10, 2013

Length Function


In Oracle/PLSQL, the length function returns the length of the specified string.

Syntax

The syntax for the length function is:
length( string1 )
string1 is the string to return the length for. If string1 is NULL, then the function returns NULL.

Applies To

  • Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i

For Example

length(NULL)would return NULL
length('')would return NULL
length('Tech on the Net')would return 15
length('Tech on the Net ')would return 16