Results 1 to 3 of 3

Thread: distinct years

  1. #1
    Join Date
    Mar 2004
    Posts
    18

    Unanswered: distinct years

    in my table I have a column Dates

    10/03/2004 18:35:00

    how can I get the list of Distinct years ?

    2001
    2002
    2003
    2004

    thank you

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    select distinct year(Dates) from yourtable
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Mar 2004
    Posts
    18
    it works !

    thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •