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

How to create Oracle stored Procedures using TOAD for Oracle

Create Tables in Oracle Database using TOAD

How to Create Packages in Oracle Database using TOAD for Oracle