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

what is domain in database and its benefits?

0 Answers  


TILL WHAT LEVEL OF SECURITY BO SUPPORTS?

1 Answers  


What is store procedure?and how do u take the values from database and run in scripts?

2 Answers   Polaris,


Difference between negative and positive adjustments : oracle accounts receivable

0 Answers  


Difference between transaction type and transaction sources. : oracle accounts receivable

0 Answers  






For web applications from which version of Oracle is suitable?

1 Answers  


What is db_recovery_file_dest in oracle? When do you need to set this value?

0 Answers  


What command would you use to create a backup control file?

1 Answers  


HOW TO GET THE ORGANIZATION TO ORGANIZATION DETAILS INFORMATION IN THE INVENTORY MODULE.THE REQUIREMENT IS FROMORG TOORG FROMINV TOINV ..

0 Answers   Infosys,


How many segment are present in Oracle Manufacturing

0 Answers   Oracle,


Can anybody tell which is the best training institute for learning Oracle in chennai...? And i also i want placement assurance

1 Answers  


You have just compiled a PL/SQL package but got errors, how would you view the errors?

1 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • 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)