今天做项目的时候,遇到个小小的问题,在数据库中查询的时候,要用String类型的ID进行一下排序!(注:ID字段为 varchar 类型) 解决的方法: 如: SELECT * FROM Student WHERE 1 = 1 ORDER BY -ID DESC 或者: SELECT * FROM Student WHERE 1 = 1 ORDER BY (ID + 1) mysql时间格式化,按时间段查询MYSQL语句 2011-04-15 09:01:08| 分类: MySQL |
本文转载:http://www.cnblogs.com/yjmyzz/archive/2012/12/18/2823170.html 今天写代码时,需要对一个数组对象中按一定规则合并.去重处理,不想再毫无新意手动写For循环遍历(天天写一样的代码很没劲),于是依旧linq,发现真心方便: using System; using System.Collections.Generic; using System.Linq; namespace LinqTest { class Program { s
ASP.NET Core MVC 2.1 特意为构建 HTTP API 提供了一些小特性,今天主角就是 ApiControllerAttribute. (注:文章是18年2月份的,所以文章提到了core2.1还没发布). 本文参考自:Exploring the ApiControllerAttribute and its features for ASP.NET Core MVC 2.1 0. ApiControllerAttribute 继承自 ControllerAttribute ASP.
前2天下载了一个2016的rc版本来玩一下,首先感觉是~开发者版本免费啦!!撒花!!!另外一个东西,sql server 2016能支持json 的解析和应用啦,虽然我不知道它的性能如何,先来一发测试一下功能 测试一下基本的,从查询结果里面构造一个json 的格式 ),Chinese int ,Math int) ,),(,),(,) select * from t1 select * from t1 for json auto --查询结果 ID name Chinese Math -----