Skip to content

Instantly share code, notes, and snippets.

@megatontech
Created January 10, 2017 06:48
Show Gist options
  • Save megatontech/de72fd089f1fabc229b410bc1d46a181 to your computer and use it in GitHub Desktop.
Save megatontech/de72fd089f1fabc229b410bc1d46a181 to your computer and use it in GitHub Desktop.
3月之内记录SQL
SELECT
top (8) col
FROM
test
WHERE
EditDate BETWEEN DATEADD(m ,- 3, GETDATE())
AND getdate()
ORDER BY
ID DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment