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

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

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

原文地址:https://www.cnblogs.com/qqflying/p/10461050.html