SQL: List of the first letters of column value?
I have keywords in table (for example texts
tab开发者_Python百科le, key
column). How to get list of first letters of keys ?
key
[b]utton.upload
[b]utton.upload_file
[c]ontent.policy
[d]ontent.policy
try
SUBSTRING (my_column, 1, 1)
or
SELECT LEFT(my_column,1)
I agree with the previous response.
But for the full query:
SELECT substring(key,1,1) AS FirstLetter FROM texts
Frank
精彩评论