mysql> SELECT name, birth FROM pet
-> WHERE MONTH(birth) = MONTH(DATE_ADD(CURDATE(),INTERVAL 0 MONTH));
...so that the output will be "this week", rather than "this month"?
'IT' 카테고리의 다른 글
Counting Rows (0) | 2011.08.26 |
---|---|
Pattern Matching (0) | 2011.08.26 |
2011-08-25 Date Calculations (0) | 2011.08.26 |
mysql (0) | 2011.08.25 |
3.7. SYSTEM PERFORMANCE COUNTERS (0) | 2011.08.25 |