|
-
Feb 28th, 2001, 12:27 PM
#1
Thread Starter
Member
Anyone tell me the SQL query i need to use to do this ? I'm currently using :
SELECT Title, ID FROM NewsArticles WHERE ID > ((SELECT MAX(ID) from NewsArticles)-3) ORDER BY ID DESC
But if the ID fields are not consecutive for whatever reason it will select only 2 or even 1 record.
I'm sure it's something really easy ... i think i'm having a bad day !
Thanks in advance
Ian.
Ian Clarke BSc (Hons) - Web Applications Programmer
Ricardo Consulting Engineers Ltd.
Email : [email protected]
-
Feb 28th, 2001, 01:11 PM
#2
Fanatic Member
SELECT TOP 3 ID, Title FROM NewsArticles ORDER BY ID 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
|