sql转百分比并保留两位小数

--转百分比并保留两位小数
select ProfitRate =Convert(nvarchar(20), (Convert(decimal(18,2),((DayPrice -MyPrice)*100/MyPrice))))+'%' from [Stock] where MyPrice>0ci

update [Stock] set ProfitRate = Convert(nvarchar(20), (Convert(decimal(18,2),((DayPrice -MyPrice)*100/MyPrice))))+'%' where MyPrice>0it

相关文章
相关标签/搜索