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 '%的%'
2024-02-25 23:20:21
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 '%的%'