1.計算數據表中一共有多少記錄sql語句 mysql> select count(*) from openes; +----------+ | count(*) | +----------+ | 136 | +----------+ 1 row in set (0.00 sec) 2.查詢字段類型為datetime的SQL語句: mysql> select * from biders where author_id =2253 and created_at between '2012-3-19 00:00:00 ' and '2012-3-19 23:59:59 '; +----+-----------+---------------------+---------------------+---------------------+ | id | author_id | created_at | updated_at | num_of_target_files | +----+-----------+---------------------+---------------------+---------------------+ | 10 | 2353 | 2012-3-19 15:21:08 | 2012-3-19 15:21:08 | NULL | +----+-----------+---------------------+---------------------+---------------------+ 1 row in set (0.00 sec) 作者 hllnihao