On 2 Jan 2003, at 14:27, Max Clark wrote:

> I have a DATE column (CCYY-MM-DD), I would like to do a query like this:
> 
> select * from table where date = '2003-01'
> 
> What additional information do I need to provide for this query to work
> properly?

You need to explain to us what result you expect.  Since '2003-01' is 
not a complete date, your criterion will never be met.  Maybe you 
want something like this?

   SELECT * FROM table_name WHERE date BETWEEN '2003-01-01' AND
      '2003-01-31';

-- 
Keith C. Ivey <[EMAIL PROTECTED]>
Tobacco Documents Online
http://tobaccodocuments.org
Phone 202-667-6653

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to