substring function code example
Example 1: sql server substring
SELECT SUBSTRING('SQL Tutorial', 1, 3) AS ExtractString;
Example 2: substring
const str = 'Mozilla';
console.log(str.substring(1, 3));
// expected output: "oz"
console.log(str.substring(2));
// expected output: "zilla"
Example 3: grab part of a string sql
SELECT
SUBSTRING('SQLTutorial.org',
POSITION('.' IN 'SQLTutorial.org'));
Example 4: grab part of a string sql
SELECT SUBSTRING('SQLTutorial.org');