Click here to Skip to main content
11,720,321 members (68,408 online)
Click here to Skip to main content
Articles » Database » Database » Oracle » Revisions
Add your own
alternative version

How to Fetch Data from the Previous or Next Rows in the Resultset

, 26 Jul 2015 CPOL 14.3K 3
This tip demonstrates the use of LAG and LEAD functions in Oracle.



Compare Revision Minor Date Status Editor
5 - publicly available Yes 26-Jul-15 16:41 Available Deeksha Shenoy
Initial creation
4 No 26-Jul-15 15:08 Available Mika Wendelius
Subsection changed
3 No 29-Jul-11 16:59 Available Mika Wendelius
1 No 22-Feb-11 18:29 Composing Mika Wendelius


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Mika Wendelius
Finland Finland
I've been a programmer since mid 80's using languages like assembler, C/C++, PL/I (mainframe environment), pascal, VB (I know, I know, no comments please) and C# and utilizing different techniques and tools.

However I'm specialized in databases and database modeling. Mostly I have used products like Oracle (from version 6), SQL Server (from version 4.2), DB2 and Solid Server (nowadays an IBM product).

For the past 10+ years my main concerns have been dealing with different business processes and how to create software to implement and improve them. At my spare time (what ever that actually means) I'm also teaching and consulting on different areas of database management, development and database oriented software design.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150901.1 | Last Updated 26 Jul 2015
Article Copyright 2011 by Mika Wendelius
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid