2011年4月12日
摘要: 在 SQL 中增加 HAVING 子句原因是,WHERE 关键字无法与合计函数一起使用查一张表中某个字段中的数据相同的记录:select 字段值,count(*) from table group by 字段值 having count(*)> 1alter table 表名 add constraint cpncode_unique unique (字段) 阅读全文
posted @ 2011-04-12 14:27 jameshappy 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 1、Math.Round(a,2)2、a.ToString( "0.00 ");3、Decimal dec=0.225; Decimal.format(dec,2) 阅读全文
posted @ 2011-04-12 14:13 jameshappy 阅读(1417) 评论(0) 推荐(0) 编辑
摘要: 一直很奇怪C#的预定义数据类型中为什么加了一个decimal,有float和double不就够了吗?今天来挖一挖。浮点型 Name CTS Type Description Significant Figures Range (approximate) float System.Single 32-bit single-precision floating point 7 ±1.5 × 10?45 to ±3.4 × 1038 double System.Double 64-bit double-precision floating point 15/1 阅读全文
posted @ 2011-04-12 14:08 jameshappy 阅读(709) 评论(0) 推荐(0) 编辑