SQL获取第一次出现指定字符前的内容

update Food set
FoodTitle=cast(SUBSTRING(FoodTitle,0,PATINDEX('%的%',FoodTitle)) as nvarchar),
FoodCode=cast(SUBSTRING(FoodCode,0,PATINDEX('%d%',FoodCode)) as nvarchar)
where FoodTitle like '%的%'

上一篇:Angular 2 + Electron 开发web和桌面应用


下一篇:几个简单的Makefile