[thelist] Quick SQL question

gabriel rivera evolt at protocol0.com
Mon Feb 10 15:13:01 CST 2003


Unless I missed something...you want to sort ascending, not descending.

So,

SELECT   TOP 15 *
FROM     MyTable
ORDER BY Col_ID ASC
                ^^^

-Gabriel

> I want the last 15 or so records from my table, so I try this:
>
> SELECT   TOP 15 *
> FROM     MyTable
> ORDER BY Col_ID DESC
>
> but this returns
>
> 255
> 254
> 253
> 252
> 251
>
> I want it to return
>
> 251
> 252
> 253
> 254
> 255




More information about the thelist mailing list