当我们按照某个字段排序时,通常使用order by语句,如果该字段存在null值,则会把null值的这条放到最上面, 那我们是否有办法解决呢? 答案是肯定的: ORDER BY CASE WHEN OrderNum IS NULL THEN 1 ELSE 0 END 这样的话,null值的这条就排队到了最后. 使用dapper查询数据时,有时候会用到模糊查询,像下面这样: SELECT * FROM T_Test WHERE Sex='男' AND (CardNo like 'xxx' OR…
15. 3Sum Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: The solution set must not contain duplicate triplets. For example, given array…