T-SQL Substring - Last 3 Characters

前端 未结 5 446
野趣味
野趣味 2021-01-31 07:01

Using T-SQL, how would I go about getting the last 3 characters of a varchar column?

So the column text is IDS_ENUM_Change_262147_190

5条回答
  •  野性不改
    2021-01-31 07:40

    Because more ways to think about it are always good:

    select reverse(substring(reverse(columnName), 1, 3))
    

提交回复
热议问题