数据库:access
 有一字段zy_time2006-05-08
2006-06-09
2007-08-08
2007-12-12
2008-06-06如何获得 2006
        2007
        2008请各位不吝赐教!
        

解决方案 »

  1.   

    select tochar(zy_time ,"yyyy") from table 
    group by tochar(zy_time ,"yyyy") 
      

  2.   

    select distinct year(zy_time) from table
      

  3.   


    select distinct datename(year,zy_time ) from table 
      

  4.   

    select distinct year(zy_time) from table
      

  5.   

     select left(CStr(zy_time),4) from table
    group by  left(CStr(zy_time),4)
    没用过access你试试来
      

  6.   

    感谢各位 自己搞定select distinct(left(zy_time,4))  from zyrz