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

How would you determine the time zone under which a database was operating?

1 Answers  


What are the main diff. between oracle 7.3 and oracle 8i?

1 Answers  


Difference between negative and positive adjustments : oracle accounts receivable

0 Answers  


what are the types of LIST REPORTS in cognos8BI? and what is the mean and use of METRIC STUDIO in Cognos 8.3BI?

0 Answers   HP,


Is Oracle 7.3 is a single user or multi user..Is it possible to use this as a backend for web applications?

2 Answers  






Explain the difference between ARCHIVELOG mode and NOARCHIVELOG mode and the benefits and disadvantages to each.

1 Answers   HCL,


hi all, i have installed oracle xe software in windows 7. iam unable to connect sqldeveloper tool. can you please tell me how to connect. provide completed procedure.

1 Answers  


what are the interface and api table for receipts conversion in oracle receivables? : oracle accounts receivable

0 Answers  


What is the meaning of "Modulus" and "Alignment" in a datafile. Data file might be from any database. Data file is created through unloading data from a table. So, while loading this data into my table, I need to use these keywords. Could any one can help me regarding this?

0 Answers  


HOW TO SPOT AHIERARCHY?

0 Answers  


what is difference between inner join & nested query or subqueries

0 Answers  


How to find locks exists in a table or not?

1 Answers   HCL,


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)