|
-
I have this table with n number of rows. I need to be able to calculate the difference between the max row and the one previous to that.
To get the max rowid, I use the following syntax:
select * from tablename
where rowid=(select max(rowid) from tablename)
But I don't know how to select the row that is immediately previous to the max(rowid): i.e. max(rowid) - 1.
(not the minimum rowid)
Anyone knows the syntax for that, please let me know!
Thanx in advance
Fiona
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
|