Friday, 18 December 2015

What is the command used to fetch first 5 characters of the string?

There are many ways to fetch first 5 characters of the string -.
 MySQL
Select SUBSTRING(StudentName,1,5) as studentname from student
1
Select SUBSTRING(StudentName,1,5) as studentname from student
 MySQL
Select RIGHT(Studentname,5) as studentname from student
 1
 Select RIGHT(Studentname,5) as studentname from student

No comments:

Post a Comment