[thelist] ASP: Select only the first record
Morgan Kelsey
morgan at morgankelsey.com
Thu Jun 19 11:43:01 CDT 2003
> 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"
>
assuming your database is SQL Server or Access, you can use TOP
SELECT TOP 1 * FROM news ORDER BY date DESC
nagrom
http://morgankelsey.com
More information about the thelist
mailing list