Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is diff

Status
Not open for further replies.

Cap2010

Programmer
Mar 29, 2000
196
CA
Hi,

Is there a command "diff" in Oracle 8/8i sql.

Where can i find further details.

Cap
 
I am trying to find difference from 1 row with next row in the same table

Cap2010
 
Use minus sql operator:

Code:
select <field1, .., fieldN> from <table>
where <condition1>
minus
select <field1, .., fieldN> from <table>
where <condition2>


Regards, Dima
 
Code:
selecr a.field - b.field
from
  (select field, rownum num from table) a
, (select field, rownum num from table) b
where a.num = b.num-1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top