就一个问号?--search
select left(movieurls,charindex('?',movieurls)-1) movieurls from tb where charindex('?',movieurls) > 0
--update
update tb set movieurls = left(movieurls,charindex('?',movieurls)-1) where charindex('?',movieurls) > 0如果有多个问号,取最后一个.
--search
select reverse(substring(reverse(movieurls) , charindex('?' , reverse(movieurls)) + 1 , len(movieurls))) from tb where charindex('?',movieurls) > 0--update
update tb set reverse(substring(reverse(movieurls) , charindex('?' , reverse(movieurls)) + 1 , len(movieurls))) where charindex('?',movieurls) > 0
select left(movieurls,charindex('?',movieurls)-1) movieurls from tb where charindex('?',movieurls) > 0
--update
update tb set movieurls = left(movieurls,charindex('?',movieurls)-1) where charindex('?',movieurls) > 0如果有多个问号,取最后一个.
--search
select reverse(substring(reverse(movieurls) , charindex('?' , reverse(movieurls)) + 1 , len(movieurls))) from tb where charindex('?',movieurls) > 0--update
update tb set reverse(substring(reverse(movieurls) , charindex('?' , reverse(movieurls)) + 1 , len(movieurls))) where charindex('?',movieurls) > 0
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货