On 9/12/05, Puneet Kishor <[EMAIL PROTECTED]> wrote: > > my table is > > name (VARCHAR), created_on (DATETIME DEFAULT CURRENT_TIMESTAMP), > modified_on (DATETIME) > > When a new record is created, it gets a value in the created_on col, > which is then not changed subsequently, but the modified_on col is > empty. Whenever the record is updated, the modified_on col is changed. > > --I want the last 10 records
If you just want 10 records with the highest modified or created time I think this will do it: select * from tbl order by max(created_on,modified_on) desc limit 10 --- The Castles of Dereth Calendar: a tour of the art and architecture of Asheron's Call http://www.lulu.com/content/77264