摘要:
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 阅读全文