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,380 points

edited Oct 22, 2018 by Sahiti 4,223 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,240 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 in Database by gaurav
• 17,580 points
188 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
2,097 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
13,668 views
0 votes
1 answer

What is the SQL query to get the third highest salary of an employee from employee_table

You can try out something like this: SELECT ...READ MORE

answered Sep 27, 2018 in Database by Sahiti
• 6,380 points
7,381 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,240 points
363 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,380 points
11,484 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,380 points
1,681 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,240 points
1,454 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,240 points
256 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP