trim values from left using SQL

后端 未结 5 1920
忘了有多久
忘了有多久 2021-01-28 02:44

I want to trim the characters from the left in my SQL value:

I have the following value:

ABC0005953

How do i trim the value 3 character

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-28 03:27

    You can use STUFF function to replace chars 1 thru 3 with an empty string

    SELECT STUFF('ABC0005953',1,3,'')
    

    I believe it's a better and more universal approach than cutting string.

提交回复
热议问题