Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

We need to compare two successive records of a table based
on a field. For example, if the table is CUSTOMER, and the
filed is Account_ID, To compare Account_IDs of record1 and
record2 of CUSTOMER table, what can be the query ?

Answer Posted / suman rana

select * from
(SELECT account_id , lead(account_id, 1, 0) over (order by
1) nxt_account_id FROM customer)
where account_id = nxt_account_id

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are privileges and grants?

1024


Can select statements be used on views in oracle?

1007


What are the differences between lov and list item?

1021


What is a schema in oracle?

988


How to use "if" statements on multiple conditions?

1131


How to assign data of the deleted row to variables?

1032


What is the sql query to concatenate column values from multiple rows in oracle?

1020


How to create a stored function in oracle?

1067


What is the purpose of tables, private synonyms and public synonyms in Oracle?

1008


How to retrieve values from data fields in record variables?

1063


In SAP ECC 6.0 , under DB02 tcode , Tablespace name to be explain stepy step all the col

4134


Who developed oracle & when?

970


What do you mean by a deadlock?

1034


How do you increase the OS limitation for open files (LINUX and/or Solaris)?

1900


candidate key is subset of super key but not vice-verse explain

2046