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

How to insert a record into a table?

1076


How many anonymous blocks can be defined?

1191


How to get a list of all user accounts in the database?

1090


An automatic job running via DBMS_JOB has failedKnowing only that its failed, how do you approach troubleshooting this issue?

2052


What the is the diff between local index and global index. give some example.

1642


What are the differences between date and timestamp in oracle?

1051


What is an oracle cursor variable?

1083


What is a lookup table in oracle?

974


Is there any function in oracle similar like group_concat of mysql?

1057


What is program global area (pga) in oracle?

1033


Can we save images in a database and if yes, how?

1066


what are archived logs?

2205


How to assign query results to variables?

1053


What are the common oracle dba tasks?

1153


How can we view last record added to a table?

1040