Check out example codes for "substring sql". It will help you in understanding the concepts better.

Code Example 1

SELECT SUBSTRING('SQL Tutorial', 1, 3) AS ExtractString;

Code Example 2

SELECT 
    SUBSTRING('SQLTutorial.org',
        POSITION('.' IN 'SQLTutorial.org'));

Code Example 3

SELECT SUBSTRING('SQL Tutorial', 4, (LENGTH('SQL Tutorial')) 
                 AS LastCharactersString;
//Result -> Tutorial

Code Example 4

SELECT SUBSTRING('SQLTutorial.org');

Learn ReactJs, React Native from akashmittal.com