转自:http://www.cnblogs.com/futuredo/archive/2012/10/19/2727204.html Constructing and matching binaries Erlang/OTP R15B02 In R12B, the most natural way to write binary construction and matching is now significantly faster than in earlier releases. 在R12
EF封装类 增加版,增加从缓存中查找数据方法,供参考! 这个类是抽象类,我这里增加了需要子类验证的方法ValidateEntity,方便扩展,若想直接使用该类,可以将该类更改成静态类,里面所有的方法都改成静态方法就可以直接调用了,可能有不足之处,欢迎大家在本文下面评论留言,共同完善,谢谢! using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.
项目中需要根据条件获取一些数据,但是如果条件相同的情况下,要去掉条件一样的并且某个值是最小的数据,留下的是最大值数据. 简单记录一下sql: --去重保留最大值那条 --Year和MCode一样的前提下的重复数据,只要Cu值最大的那条 select * from tbMonitorResults t from tbMonitorResults where Year = t.Year and MCode=t.MCode and Cu > t.Cu)
同一张表存在类似多级菜单的上下级关系的数据,查询出符合条件的某些数据的id拼接成一个字段返回: SELECT CONCAT(a.pid, ',', b.subid) AS studentIDS FROM (SELECT id as pid, sourceCode as scode FROM student WHERE studentType='父级条件1' AND studentCode='父级条件2') a LEFT JOIN (SELECT id as subid, parentCode p