Jeffrey,
You can use the TOP predicate along with ORDER BY DESC to pull off the last
X number of records
SELECT TOP 5 ArticleID, Article
FROM Articles
ORDER BY ArticleID DESC
This assumes your primary key is called "ArticleID."
-Dan
+--------+---------------------------+
| name | Dan G. Switzer, II |
|company | PengoWorks.com |
| www | http://www.pengoworks.com |
| mailto | [EMAIL PROTECTED] |
+--------+---------------------------+
-----Original Message-----
From: Jeffrey Cohen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 06, 2000 10:36 AM
To: House OfFusion
Subject: Best Method
Greetings...
What is the best method for reading ONLY the last five records in a
database for display?
I have a client that adds articles daily to a news database, and then
displays them on a news page. There are hundreds of articles, and on his
home page he just wants to display the 5 most recent. (which would be
the last five in the database, I presume....)
Suggetstions???
and thanks as always for your help in advance...
Jeffrey Cohen
ImageWorks
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.