在mysql中,小弟我想通过指定的“月份”来查询这个月的所有数据,这条sql如何写?
在mysql中,我想通过指定的“月份”来查询这个月的所有数据,这条sql怎么写?急!!!!!!!

如图,我想查询2011-2月份的所有数据,这条sql该怎么写呢?
------解决思路----------------------
以上是oracle数据库下的操作,我看到你说的是mysql.你就可以这样:
select t.* from A t where date_format(t.a,'%Y-%m')='2011-02';
如图,我想查询2011-2月份的所有数据,这条sql该怎么写呢?
------解决思路----------------------
以上是oracle数据库下的操作,我看到你说的是mysql.你就可以这样:
select t.* from A t where date_format(t.a,'%Y-%m')='2011-02';