|
-
May 17th, 2001, 04:12 AM
#1
Thread Starter
New Member
Calling last 5 records from database????
Morning
Could anyone give me any code that would enable me to call the last 5 records from an sql database?
-
May 17th, 2001, 04:39 AM
#2
-
May 17th, 2001, 04:54 AM
#3
Thread Starter
New Member
around 200 records holding articles......
-
May 17th, 2001, 09:29 AM
#4
Frenzied Member
You can still use the top function because you say you want the last 5 records. Last is just relative to if the recordset is sorted ascending or descending. So do this:
Code:
Select top 5 yourfieldname from yourtable where ... order by yourfieldname asc(or desc)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|