1 exec sp_executesql N'SELECT 2 [Extent2].[Id] AS [Id], 3 [Extent2].[Name] AS [Name], 4 [Extent2].[Description] AS [Description], 5 [Extent2].[RoleTypeNum] AS [RoleTypeNum], 6 [Extent2].[IsDeleted] AS [IsDeleted], 7 [Extent2].[AddDate] AS [AddDate],
/** * parse double f to num decimals * @param f * @param num the decimal number * @return the format number */ public double decimalNum(double f, int num) { BigDecimal bg = new BigDecimal(f); double f1 = bg.setScale(num, BigDecimal.ROUND_HALF_UP).dou
Java中double类型的数据精确到小数点后两位 多余位四舍五入,四种方法 一: double f = 111231.5585;BigDecimal b = new BigDecimal(f); double f1 = b.setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue(); 二: new java.text.DecimalFormat("#.00").format(3.1415926) 三: double d = 3.1415926