如何在SQL Server中将123456.78
转换为123,456.78
?
我从123456.78
这样的表中获取数据,我必须将其显示为123,456.78
答案 0 :(得分:2)
试试这个,
SELECT CAST(CONVERT(varchar, CAST(123456 AS money), 1) AS varchar)
用您的号码替换123456
答案 1 :(得分:1)
SELECT CONVERT(varchar, CAST(123456 AS money), 1)
答案 2 :(得分:0)
试试这个
SELECT CONVERT(varchar, CAST(123456.78 AS money), 1) as Value