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 darklord
• 6,140 points

edited Oct 22, 2018 by darklord 19 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,100 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 darklord
• 6,140 points
30 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 darklord
• 6,140 points
25 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 darklord
• 6,140 points
35 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 darklord
• 6,140 points
38 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,100 points
24 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 darklord
• 6,140 points
575 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 darklord
• 6,140 points
74 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,100 points
51 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,100 points
12 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.