How To Extract Some Characters From A String In Oracle

In Oracle SUBSTR function accepts three parameters and returns a string consisting of the number of characters extracted from the source string, beginning at the specified start position.
The syntax for the SUBSTR function is: SUBSTR( string, start_position, [ length ] )

Examples
SELECT SUBSTR(‘PASSWORD’,1,4) FROM DUAL;
RESULT: PASS



SELECT SUBSTR(‘PASSWORD’,5) FROM DUAL;
RESULT: WORD

Comments

Popular posts from this blog

What is Oracle Integration Cloud Service - ICS?

How to Create Packages in Oracle Database using TOAD for Oracle

How to create a Simple Scheduler Job in Oracle Database using Toad