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
Can we store images in oracle database?
How would you begin to troubleshoot an ORA-3113 error?
State the difference along with examples between Oracle 9i, Oracle 10g and Oracle 11i.
How to use "out" parameter properly?
What is key preserved table?
what is the scripts in data base?
What do you know about normalization? Explain in detail?
How do I know if oracle is installed on windows?
How to add a new column to an existing table with a default value?
What is blob data type in oracle?
How do you bind variables in oracle?
How do we get field details of a table?
How to define a data source name (dsn) in odbc manager?
How to manage transaction isolation level?
Explain the use of grant option in imp command.