how to do string sql code example Example: how to fetch first 5 characters in sql Select SUBSTRING(StudentName,1,5) as studentname from student