Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (55.6k points)

Can anyone explain substring with example in SQL?

1 Answer

0 votes
by (119k points)

Substring () function is used to slice some characters from a string. The following is the syntax for the substring() function:

SUBSTRING( string, start_position, length)

If you want to find the first 10 characters of customer names, then following is the query for that:

SELECT SUBSTRING (Customer_name, 1, 10)

FROM Customers

If you are a beginner and want to learn SQL, then check out this SQL training course by Intellipaat.

Related questions

0 votes
1 answer
0 votes
1 answer
asked May 4, 2020 in SQL by Sudhir_1997 (55.6k points)
0 votes
1 answer
asked May 4, 2020 in SQL by Sudhir_1997 (55.6k points)
0 votes
1 answer
asked May 4, 2020 in SQL by Sudhir_1997 (55.6k points)
0 votes
1 answer
asked May 3, 2020 in SQL by Sudhir_1997 (55.6k points)

Browse Categories

...