create table tb(imgPath varchar(50))
insert into tb select 'd1/d2/f1'--d1/d2/dd/f1
select left(imgPath,len(imgPath)-charindex('/',reverse(imgPath))) from tb
转载于:https://www.cnblogs.com/xiajing12345/p/3356740.html
create table tb(imgPath varchar(50))
insert into tb select 'd1/d2/f1'--d1/d2/dd/f1
select left(imgPath,len(imgPath)-charindex('/',reverse(imgPath))) from tb
转载于:https://www.cnblogs.com/xiajing12345/p/3356740.html