Home » SQL & PL/SQL » SQL & PL/SQL » fetching the current and previous column value for the current record
fetching the current and previous column value for the current record [message #2544] Thu, 25 July 2002 03:44 Go to next message
Deepa
Messages: 269
Registered: November 2000
Senior Member
hi,
i have a table called test. i want to display both the current record column value and previous record value for the same column in the current record.
for eg:table test contains the following record for the column empno.
test:
empno
1
2
3
i want to view the record like
currentrecord value previous record value
1 1
2 1
3 2
Re: fetching the current and previous column value for the current record [message #2559 is a reply to message #2544] Fri, 26 July 2002 10:22 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
LAG is a built-in analytical function available in Oracle 8.1.6 and later - it is not a custom-written function.
Previous Topic: How can I view the trigger definition in Oracle
Next Topic: serial number in select statement
Goto Forum:
  


Current Time: Fri Apr 26 14:40:11 CDT 2024