Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in SQL by (20.3k points)

I have a SQL column with a length of 6. Now want to take only the first char of that column. Is there any string function in SQL to do this?

1 Answer

0 votes
by (40.4k points)

It's most preferable to use LEFT, as it's more readable and cleaner to use. Otherwise, there's no difference between them.  

LEFT(colName, 1) is equal to SUBSTRING(colName, 1, 1).

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers


94k users

Browse Categories