sql怎么查询字符串最右边几位

2025年03月13日 04:09
有1个网友回答
网友(1):

--例:查询右边5位
--sqlserver
select right(字段名,5) from 表名
--oracle
select substr(字段名,-5) from 表名