Use of BETWEEN

wxdqz

New Member
I don't quite understand the use of BETWEEN and the manual doesn't describe this very much? Can I use BETWEEN within WHERE clause, so I could do something like this

SELECT * FROM person WHERE (birth BETWEEN 20010101 AND 20011231) !!! This does not work

I hope you understand what I'm trying to do here. I would like to select all persons that were born durig the year 2001. I have their birth dates in TIMESTAMP format. So if a person is born on 2 Apr 2001 the timestamo would be 20010403 (yyyymmdd).

Can you give me any suggestions?

Thanx
Blaz
 
Back
Top