http://publib.boulder.ibm.com/infocenter/idshelp/v115/index.jsp?topic=/com.ibm.sqls.doc/ids_sqs_0187.htm List of Expressions Each category of SQL expression includes many individual expressions. The following table lists all the SQL expressions (and…
原文地址:https://www.cnblogs.com/zhangpengnike/p/6122588.html 一.统计语句 1.--统计当前[>当天00点以后的数据] SELECT * FROM 表 WHERE CONVERT(Nvarchar, dateandtime, 111) = CONVERT(Nvarchar, GETDATE(), 111) ORDER BY dateandtime DESC 2.--统计本周 SELECT * FROM 表 WHERE datediff(wee…