[thelist] ASP: Select only the first record

Jay Blanchard jay.blanchard at niicommunications.com
Thu Jun 19 11:28:57 CDT 2003


[snip]
How would one select only the very first record from a table.  This
select
statement, of course, adds all rows to a recordset.  What I want is only
the
record with the most recent date...

"SELECT * FROM news ORDER BY date DESC"
[/snip]

"SELECT * FROM news ORDER BY date DESC LIMIT 1"

HTH!

Jay


More information about the thelist mailing list