摘要: SELECT * FROM 表 WHERE CONVERT(Nvarchar, dateandtime, 111) = CONVERT(Nvarchar, GETDATE(), 111) ORDER BY dateandtime DESC本月记录SELECT * FROM 表 WHERE datediff(month,[dateadd],getdate())=0本周记录SELECT * FROM 表 WHERE datediff(week,[dateadd],getdate())=0当天记录SELECT * FROM 表 WHERE datediff(day,[dateadd],getdate 阅读全文
posted @ 2013-01-08 17:41 MiniOutman 阅读(418) 评论(4) 推荐(0) 编辑