求一sql语句?
2006-12-14 08:26 |
| 2006-12-15 10:19 |
| 2006-12-20 08:50 |
| 2006-12-20 09:21 |
| 2006-12-20 10:13 |
| 2006-12-20 10:51 |
| 2006-12-21 14:15 |
| 2006-12-21 15:59 |
| 2006-12-25 09:37 |
| 2006-12-26 12:09 |
| 2006-12-27 11:44 |
| 2006-12-30 09:22 |
| 2006-12-30 09:48 |
| 2007-01-04 09:09 |
| 2007-01-04 11:00 |
| 2007-01-05 09:18
我的字段名是ntime 类型是varchar,想求两条语句
一个是把2006的都选出来(从2006-12-14 08:26到2006-12-30 09:48),另一个把2007的都选出来(从2007-01-04 09:09到2007-01-05 09:18) 小弟初学,在线等
------解决方案--------------------select * from t where left(ntime,4)= '2006 '