开发者

SQL: List of the first letters of column value?

开发者 https://www.devze.com 2023-03-13 05:36 出处:网络
I have keywords in table (for example texts tab开发者_Python百科le, key column). How to get list of first letters of keys ?

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

0

精彩评论

暂无评论...
验证码 换一张
取 消