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 a table in oracle?

974


How do you get nicely formatted results from an oracle procedure that returns a reference cursor?

1066


1) WIll all the user get the DEFAULT profile, if their current profile got deleted at any point of time? 2) What are the Situation we need to MOVE the TABLE between T.spaces? 3) What is the use of MOVING the TABLE between SCHEMA'S? 4) What are the Table Clause, Segment Clause and the Datafile Clause which will override each other? 5) Explain SORT_AREA_SIZE of Tempfile to make UNIFORM SIZE

1965


What is a data dictionary and how can it be created?

1138


What is clustered table in Oracle?

1187


What are data pump export and import modes?

1060


Explain a segment?

1083


Database is hung. Old and new user connections alike hang on impact. What do you do? Your SYS SQLPLUS session IS able to connect.

2155


What is a lookup table in oracle?

970


What are the different types of database objects?

1056


How to create a new table by selecting rows from another table?

1076


How can you use check constraints for self referential integrity?

963


How do I start tns listener?

1038


How to revoke create session privilege from a user in oracle?

1010


What are the attributes that are found in a cursor?

1061