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

相關文章
相關標籤/搜索