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 is meant by magic query

2230


What are the four Oracle system processes that must always be up and running for the database to be useable?

1050


Explain the use of owner option in exp command.

1097


How would you edit your CRONTAB to schedule the running of /test/test.sh to run every other day at 2PM?

1991


What is raw datatype?

1188


How to convert a date to char in oracle? Give one example.

1107


Explain index?

1306


Explain a data segment?

1112


How to export data with a field delimiter?

1085


When do you get a .pll extension in oracle? Explain its importance

1097


How to use an explicit cursor without open statements?

1099


What are the attributes of cursor?

1104


Explain what are the uses of rollback segment?

1067


What are named parameters?

1142


What is max rowid in oracle?

1081