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

2025-03-13 04:09:59
推荐回答(1个)
回答1:

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