i am having comm in emp table and i want to display 0 when
comm =null and -10 if comm= value

Answers were Sorted based on User's Feedback



i am having comm in emp table and i want to display 0 when comm =null and -10 if comm= value..

Answer / shaik

select e.*,decode(comm,null,0,-10) new_comm
from emp e

Is This Answer Correct ?    11 Yes 1 No

i am having comm in emp table and i want to display 0 when comm =null and -10 if comm= value..

Answer / rupali

SELECT NVL2(COMM,-10,0)AS Commission FROM emp

Is This Answer Correct ?    5 Yes 0 No

i am having comm in emp table and i want to display 0 when comm =null and -10 if comm= value..

Answer / siva

select nvl2(comm,-10,0) "New Comm" from employees;

Is This Answer Correct ?    4 Yes 0 No

i am having comm in emp table and i want to display 0 when comm =null and -10 if comm= value..

Answer / prajakta

select case when comm is null then 0 else -10 end from emp

Is This Answer Correct ?    3 Yes 1 No

i am having comm in emp table and i want to display 0 when comm =null and -10 if comm= value..

Answer / s.rajeshkumar

select nvl2(comm,0,-10) "New Comm" from employees;

Is This Answer Correct ?    7 Yes 6 No

i am having comm in emp table and i want to display 0 when comm =null and -10 if comm= value..

Answer / swati

update emp set comm =
case
when comm is null then 0
else
10
end

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More Oracle AllOther Interview Questions

Explain materialized views and how they are used.

2 Answers  


what are the tools used for oracle 10g in real time.

0 Answers   IBM,


What are the mandatory setups in setting up a PO in oracle

1 Answers   Silicon,


CAN AUNIVERSE BE LINKED TO MORE THAN ONE DATASOURCE?

0 Answers  


please explain about oracle

1 Answers  






What view would you use to determine free space in a tablespace?

0 Answers  


Explain the difference between a hot backup and a cold backup and the benefits associated with each

1 Answers  


how to display last 5 letters from a name (take emp table ename )

6 Answers   IBM,


Hi, IN oracle apps HRMS, if the employee changes his department, and when a conconurrent program is run for calulating the pay, The latest Dept id is not diaplayed, howeber the previous deptid is considered. Please can someone tell me where is the program going wrong, which side?

0 Answers  


What is the use of transaction flexfield in autoinvoice? : oracle accounts receivable

0 Answers  


default triggers available for reports

0 Answers  


What is the disk migration? what is the steps involved in oracle disk migration?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1808)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)