Thursday, 21 September 2017

Lenght Function

Length function returns the number of characters in a value.
If the string is NULL it returns NULL.

Syntax: LENGTH(COLUMNS/Exp)
Example:

Use of LENGTH Function
SELECT 'ORACLE' String,LENGTH('ORACLE') Length FROM DUAL;
SELECT Ename||' Your Name is A Collection of '||LENGTH(Ename)||' Characters.' EnameLength FROM Emp;
SELECT INITCAP(Ename) Name,Job FROM Emp WHERE LENGTH(Job) = 7;



No comments:

Post a Comment