LENGTH returns an integer that is the length of the 1st argument. The 1st argument can be a CHAR, VARCHAR2,NCHAR,NVARCHAR2,CLOB or NCLOB datatype. Example: SELECT LENGTH(‘How long is this?’) as RESULT FROM DUAL; RESULT —————- 17
LAST_DAY – Oracle SQL Function
LAST_DAY returns the last day of the month specified in argument1. Argument1 can be a DATE value or a string that can resolve to a DATE datatype. Example: SELECT LAST_DAY(’12-OCT-04′) as RESULT from DUAL; RESULT ————— 31-OCT-04
Lower – Oracle SQL Function
LOWER returns a string that is the same as the 1st argument with all the characters in lowercase. The argument to LOWER can be a CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB or NCLOB. Example: SELECT LOWER(‘Oracle Rocks’) as RESULT FROM DUAL;
LOCALTIMESTAMP – Oracle SQL Function
LOCALTIMESTAMP returns a TIMESTAMP value. You can specify an optional integer argument to specfiy the precision of the second field. Example: SELECT LOCALTIMESTAMP FROM DUAL; LOCALTIMESTAMP —————————- 13-SEP-05 03.02.49.407000 PM
Lpad – Oracle SQL Function
LPAD returns a VARCHAR2 string that is arg1 left padded with arg3 for a length of n. If arg3 is not provided Oracle will pad with blank spaces. Example: SELECT LPAD(’10 + signs’,10,’+’) as RESULT from DUAL; RESULT —————— ++++++++++10
MONTHS_BETWEEN – Oracle SQL Function
MONTHS_BETWEEN returns an integer specfiying the number of months between two dates. The result can be either positive or negative depending on which date is greater. Example: SELECT MONTHS_BETWEEN(10-JAN-2036′, ’10-JAN-2004′ ) AS RESULT FROM DUAL; RESULT ——————- 384
Substr – Oracle SQL Function
The substr functions allows you to extract a substring from a string. The syntax for the substr function is: substr ( string , start_position , [ length ]) string is the source string. start_position is the position for extraction. The
Exp – Oracle SQL Function
EXP returns 2.71828183 raised to the exp power. Example: SELECT EXP(2) as squared from dual; SQUARED ———————- 7.38905609893065022…..
Nvl – Oracle SQL Function
The NVL function lets you substitutes a non-value when a null value is encountered. The syntax for the NVL function is: NVL ( string1, replace_with ) string1 is the string to test for a null value. replace_with is the value
Ln – Oracle SQL Function
LN returns the natural log of the argument. The argument can be a numeric value or any type that can be implicitly converted to a numeric value. The function returns a value that is the same type as the numeric
