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?
LEFT(colName, 1) will also do this, also. It's equivalent to SUBSTRING(colName, 1, 1).
LEFT(colName, 1)
SUBSTRING(colName, 1, 1)
I like LEFT, since I find it a bit cleaner, but really, there's no difference either way.
LEFT
1.4m articles
1.4m replys
5 comments
57.0k users