Bhuvan A <[EMAIL PROTECTED]> writes: > I need ONLY the 'n-1'th record. See the 'LIMIT' and 'OFFSET' clauses in SELECT. Note the caveat that you'd better ORDER the rows to be sure you know which is the n-1'th. Having done an ORDER BY, you could simplify your life by reversing the ordering and choosing the second row (OFFSET 1 LIMIT 1). regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
- [SQL] Getting 'n-1'th record. Bhuvan A
- Re: [SQL] Getting 'n-1'th record. Tom Lane
- Re: [SQL] Getting 'n-1'th record. Josh Berkus
- [SQL] Re: Getting 'n-1'th record. Jeff Eckermann
- Re: [SQL] Getting 'n-1'th record. omid omoomi