Is there a simple query that will allow me to select all the names that fall between 2 different dates (say 2003-01-01 and 2003-03-01)
Thanks in advance for any replies
You can use the same comparison operators like on other data types, e.g.
SELECT name FROM mytable WHERE 'date' > '2003-01-01' AND 'date' < '2003-03-01';
or, even more easy:
SELECT name FROM mytable WHERE 'date' BETWEEN '2003-01-01' AND '2003-03-01';
note1: pay attention when you called a column 'date'. it needs to be quoted since it is a sql keyword. better avoid such names at all.
note2: pay attention when your column is of type datetime or timestamp instead of simple date, e.g.
'2003-03-01 04:15:55' will NOT be found with the restriction examples above because when the time part of a datetime is missing, always '00:00:00' is assumed.