方法二
declare @sql varchar(100)
set @sql='/paperdb/paperskinfile/default.skin'
select stuff(right(right(@sql,len(@sql)-charindex('/',@sql)),len(right(@sql,len(@sql)-charindex('/',@sql)))-(charindex('/',right(@sql,len(@sql)-charindex('/',@sql))))),1,charindex('/',right(right(@sql,len(@sql)-charindex('/',@sql)),len(right(@sql,len(@sql)-charindex('/',@sql)))-(charindex('/',right(@sql,len(@sql)-charindex('/',@sql)))))),'')
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
default.skin