Subject | Re: [firebird-support] How can I get the last 500 records in a table using sql? |
---|---|
Author | Thomas Steinmaurer |
Post date | 2005-01-27T10:17:02Z |
> How can I get the last 500 records in a table using sql?Assumed "last" means the 500 highest values of an integer primary key
column ID, then try:
SELECT FIRST 500 * FROM TABLE1 ORDER BY ID DESC
--
HTH,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database and MS SQL Server
Upscene Productions
http://www.upscene.com