I've got a table that tracks expiration dates. Currently, if the
record hasn't expired, the column is stored as NULL. In order to find
records that haven't expired, I search for "WHERE expire_at > NOW() OR
expire_at IS NULL". This seems dirty, and I suspect it makes my
indexes very angry.

I suppose I could pick some arbitrary future date (Dec 31 2999) to use
in place of NULL.

Is there a better way? Surely I'm not the first to run into this!

Thanks,

Norman

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to