write sql query following source are
EmpID, Salary
101 1000
102 2000
103 3000
I want the output format like following
empid,sal,composite_sal
101 1000 1000
102 2000 3000
103 3000 6000

Answer Posted / niru

select empid,sal,sal+lead(nvl(sal,0) from emp_det

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we create database in oracle using command line ?

588


I have a table called 'test' on source and target with same name, structure and data type but in a different column order. How can you setup replication for this table?

632


How do you tell what your machine name is and what is its IP address?

1522


How can we force the database to use the user specified rollback segment?

562


In XIR2 if we lost the administration password .How can we regain the password?thanks in advance.

1477






How to view the tablespaces in the current database?

566


Please explain compound trigger in oracle?

607


How can I introduce multiple conditions in like operator?

561


What are the system predefined user roles?

593


How many types of auditing in Oracle?

573


Explain the use of indexes option in exp command.

599


What is the usage of save points in oracle database?

539


Where are the settings stored for each instance in oracle?

636


How to define an anonymous procedure without variables?

555


What are joins, explain all types of joins?

1729