sql server - How to get first character of a string in SQL? -
I have an SQL column with a length of 6. Now you want to take only the first letter of that column. Is there a string function in SQL to do this?
left (colName, 1) will do the same too. This is equivalent to SUBSTRING (colName, 1, 1) .
I like it LEFT , because I find it a bit cleaner, but in reality, there is no difference.
Comments
Post a Comment