How to write a sql statement to retriev开发者_开发知识库e repeated yearly event, which mean retrieve all the event regardless year only match with month and date.
Select * from Event where [date] = date ?
You can use the DAY() and MONTH() functions on a date field
SELECT * FROM Event WHERE MONTH(Date) = '7' AND DAY(Date) = '4'
That would get you all events that happen on the 4th of July, regardless of the year.
You can use MONTH() and DAY() for this:
SELECT
*
FROM
Event
WHERE
MONTH([date]) = 12
AND
DAY([date]) = 25
精彩评论