0% found this document useful (0 votes)
60 views

11 - 10 - 9 - 8 - 7 - 6 - 5 - 4 - 3 - 2 - 1 J A Y A P R A K A S H 1 2 3 4 5 6 7 8 9 10 11 L R SELECT 'Jayaprakash' FROM Dual

This document provides examples of using the SUBSTR function in Oracle SQL to extract substrings from a string. It shows how SUBSTR can extract characters starting from position 0 for a length of 4 to return 'Jaya'. Another example starts at position 4 with a length of 4 to return 'prak'. The last example starts from the -4 position for a length of 5 to return 'prakash'.

Uploaded by

redro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views

11 - 10 - 9 - 8 - 7 - 6 - 5 - 4 - 3 - 2 - 1 J A Y A P R A K A S H 1 2 3 4 5 6 7 8 9 10 11 L R SELECT 'Jayaprakash' FROM Dual

This document provides examples of using the SUBSTR function in Oracle SQL to extract substrings from a string. It shows how SUBSTR can extract characters starting from position 0 for a length of 4 to return 'Jaya'. Another example starts at position 4 with a length of 4 to return 'prak'. The last example starts from the -4 position for a length of 5 to return 'prakash'.

Uploaded by

redro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

-11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1

J A Y A P R A K A S H
1 2 3 4 5 6 7 8 9 10 11

L >>>>>>R
SELECT 'Jayaprakash' FROM dual;

SYNTAX:
SELECT SUBSTR(col/Exp, M,[N]) FROM dual;
--> N -- counts from left to right only
SELECT SUBSTR('Jayaprakash',0,4) FROM dual;

SELECT SUBSTR('Jayaprakash',4,4) FROM dual;

SELECT SUBSTR('Jayaprakash',-4,5) FROM dual;

You might also like