in Mysql Doku:
http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_extract
SELECT EXTRACT( YEAR_MONTH FROM `date` )
FROM `Table` WHERE Condition = 'Condition';
More Related Contents:
- Left Outer Join doesn’t return all rows from my left table?
- Get a list of dates between two dates
- How to populate a table with a range of dates?
- MySQL Query GROUP BY day / month / year
- Error in MySQL when setting default value for DATE or DATETIME
- Difference between two dates in MySQL
- Get the latest date from grouped MySQL data
- How to select the most recent set of dated records from a mysql table
- Compare only day and month with date field in mysql
- Insert/ Update random date in MySQL
- #1292 – Incorrect date value: ‘0000-00-00’ [duplicate]
- SQL date format convert? [dd.mm.yy to YYYY-MM-DD]
- SQL Query needed for fetch value from Two identical table but not fully identical table
- SQL select only rows with max value on a column [duplicate]
- How to create a MySQL hierarchical recursive query?
- How to reset AUTO_INCREMENT in MySQL
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- SQL counting all rows instead of counting individual rows
- Combining UNION and LIMIT operations in MySQL query
- MySQL comparison with null value
- MySQL Like multiple values
- Matching all values in IN clause
- MySQL add days to a date
- INTERSECT in MySQL
- Check for x consecutive days – given timestamps in database
- How do I get the ID of multiple inserted rows in MySQL?
- How to alter a column and change the default value?
- sql join tables where 1 column has comma
- Remove special characters from a database field
- update a column by subtracting a value