how to get substring in sql code example

Example 1: get first 3 letters in sql

SELECT FIRST_NAME ,  SUBSTR(FIRST_NAME, 1 , 3 ) , LENGTH(FIRST_NAME)
FROM EMPLOYEES ;

Example 2: sql server substring

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

Example 3: substring sql

SELECT SUBSTR(first_name, 0 , 3)
From employees;

Example 4: how to fetch first 5 characters in sql

Select SUBSTRING(StudentName,1,5) as studentname from student

Example 5: substring sql

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