陋室铭
永远也不要停下学习的脚步(大道至简至易)

declare @str varchar(50)

set @str='-'+'1-9-3-2'--前面加个'-'防止没有'-'出错

select REVERSE(SUBSTRING(REVERSE(@str),1,CHARINDEX('-',REVERSE(@str))-1))

 

posted on 2014-11-14 16:14  宏宇  阅读(2123)  评论(0编辑  收藏  举报