I have a table that is ordered by artID with 1 being the first and so on. I want to select the entire last row, but so far have only been able to select the max artID instead of the whole row. This is what I've been using: SELECT MAX(artID) AS artID FROM articles I need something that selects the whole row, and not just the artID. Any ideas???
Michael Fitzmaurice
Ranch Hand
Joined: Aug 22, 2001
Posts: 168
posted
0
How about something along the lines of: SELECT * FROM articles WHERE artID = (SELECT MAX(artID) FROM articles) I can't verify that this exact syntax works, but you can probably see where I'm coming from logically. If the original SELECT statement works, can you not use it as a subquery to the other SELECT? Or use a temporary variable to store the result (a value for artID) of the original query, then do a SELECT * FROM articles WHERE artID = (your temporary variable) Any good? ------------------ "One good thing about music - when it hits, you feel no pain" Bob Marley
"One good thing about music - when it hits, you feel no pain" <P>Bob Marley