Sql last 7 days

This article is tagged with: Sql last 7 days and mysql

sql last 7 days

SELECT id, NewsHeadline as news_headline, NewsText as news_text, state CreatedDate as created_on
FROM News
WHERE CreatedDate >= DATEADD(day,-7, GETDATE())

This article is tagged with: Sql last 7 days and mysql