SQLSERVER类似于lastindexof的语句 select REVERSE(SUBSTRING(REVERSE(test),0,CHARINDEX('-',REVERSE(test)))) from tmp 备注:其中reverse代表反转的意思