PRIMARY KEY and CreationTime columns

2008-03-16 Thread Waynn Lue
Say I have this schema CREATE TABLE temp ( EntityId BIGINT AUTO_INCREMENT PRIMARY KEY, CreationTime DEFAULT NOW() ); Now let's say I want to find all rows created within the last 24 hours. If I do select * from temp where CreationTime DATE_SUB(NOW(), INTERVAL 24 HOUR) that's going to do

Re: PRIMARY KEY and CreationTime columns

2008-03-16 Thread Rob Wultsch
On Sun, Mar 16, 2008 at 5:48 AM, Waynn Lue [EMAIL PROTECTED] wrote: Say I have this schema CREATE TABLE temp ( EntityId BIGINT AUTO_INCREMENT PRIMARY KEY, CreationTime DEFAULT NOW() ); Now let's say I want to find all rows created within the last 24 hours. If I do select *