> and so it does. Gracias. ;-)
>
> Now I am off happily experimenting with applying other functions to
> ORDER BY before ordering them.
Thanks Derrell.
You've used your super powered intellect well today! ;)
---
The Castles of Dereth Calendar: a tour of the art and architecture of
Asheron's
On Sep 12, 2005, at 8:54 AM, [EMAIL PROTECTED] wrote:
Jay Sprenkle <[EMAIL PROTECTED]> writes:
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
except that if modified_on is
>
>
> > 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
>
> I didn't realize MAX could be used in ORDER BY.
>
> However, the above does not work. It seems to overlook
Jay Sprenkle <[EMAIL PROTECTED]> writes:
> 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
except that if modified_on is null, you won't get that record. This
On Sep 12, 2005, at 8:43 AM, Jay Sprenkle wrote:
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
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
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
7 matches
Mail list logo