Back

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

Can anyone tell me how to find the length of a string in SQL?

1 Answer

0 votes
by (119k points)
edited by

We can use LEN() function to find the length of string in SQL. Here is the syntax for using LEN() function:

LEN(‘String’)

Here is an example to find the length of a string in SQL:

SELECT LEN (‘SQL Tutorial’);

It returns 12 because it counts the space also as a character. If you don’t specify any string, returns a null value.

To learn string functions in SQL, you should enroll in this Microsoft SQL certification program by Intellipaat.

Related questions

0 votes
1 answer
0 votes
1 answer

Browse Categories

...