Fetch first 5 characters of the string

0 votes

Hi!!

Can someone tell me how to fetch the first 5 characters of the string?

Oct 22, 2018 in Database by Sahiti
• 6,370 points

edited Oct 22, 2018 by Sahiti 5,896 views

1 answer to this question.

0 votes

There are a lot of ways to fetch characters from a string. For example:

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

answered Oct 22, 2018 by DataKing99
• 8,250 points

Related Questions In Database

0 votes
1 answer

Remove special characters from the specified string in excel

To erase a specific character from a ...READ MORE

answered Mar 15, 2022 in Database by gaurav
• 23,260 points
1,637 views
0 votes
0 answers

How can I select the first day of a month in SQL?

I only need to choose the given ...READ MORE

Aug 14, 2022 in Database by Kithuzzz
• 38,000 points
624 views
0 votes
2 answers

What are the ways to get the count of records in a table

With the help of the SQL count ...READ MORE

answered Aug 20, 2020 in Database by Okugbe
• 280 points
3,991 views
0 votes
2 answers

Write a SQL query to find the names of employees that begin with ‘S’

Select ename From emp Where ename like"s%"; READ MORE

answered Oct 7, 2021 in Database by anonymous
27,102 views
0 votes
1 answer

Why is not preferable to use mysql_* functions in PHP?

The reasons are as follows: The MySQL extension: Does ...READ MORE

answered Sep 7, 2018 in Database by DataKing99
• 8,250 points
1,268 views
0 votes
1 answer

Find values in a comma separated string in a MySQL query

You can add commas to the left and ...READ MORE

answered Sep 10, 2018 in Database by Sahiti
• 6,370 points
12,897 views
0 votes
1 answer

How to do a batch insert in MySQL

You can try out the following query: INSERT ...READ MORE

answered Sep 10, 2018 in Database by Sahiti
• 6,370 points
2,317 views
0 votes
1 answer
0 votes
1 answer

What are the various levels of constraints

Constraints are the representation of a column ...READ MORE

answered Oct 18, 2018 in Database by DataKing99
• 8,250 points
2,788 views
0 votes
1 answer

What is the need of MERGE statement?

This statement allows conditional update or insertion of ...READ MORE

answered Oct 23, 2018 in Database by DataKing99
• 8,250 points
971 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP