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

edited Oct 22, 2018 by Sahiti 455 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,150 points

Related Questions In Database

0 votes
1 answer

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

To count the number of records in ...READ MORE

answered Sep 26, 2018 in Database by Sahiti
• 6,290 points
189 views
0 votes
1 answer

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

To display the name of the employees ...READ MORE

answered Sep 26, 2018 in Database by Sahiti
• 6,290 points
126 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 26, 2018 in Database by Sahiti
• 6,290 points
1,185 views
0 votes
1 answer

What are the different types of index?

There are three types of index namely: Unique ...READ MORE

answered Oct 17, 2018 in Database by Sahiti
• 6,290 points
2,103 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,150 points
106 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,290 points
5,723 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,290 points
836 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,150 points
305 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,150 points
51 views