保留十位有效数字 2015/06/24 15273 DECLARE @execsql NVARCHAR(1024) SET @execsql =N'SELECT CAST('+CAST(125.365412354 AS NVARCHAR(20)) +N' AS NUMERIC (20,'+STR(10-CEILING(LOG10(125.365412354)))+N'))' EXEC SP_EXECUTESQL @execsql