(SQL Server)使用AVG,MAX,MIN时将varchar转换为money

时间:2015-10-20 02:12:19

标签: sql-server sql-server-2014 currency

SELECT '$' + CONVERT(varchar, CAST(AVG(devMarketCap) AS money),1), 
'$' + CONVERT(varchar, CAST(MIN(devMarketCap) AS money),1), 
'$' + CONVERT(varchar, CAST(MAX(devMarketCap) AS money),1)

FROM developer

可以改进或缩短吗?

0 个答案:

没有答案