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
Answer / shaik
select e.*,decode(comm,null,0,-10) new_comm
from emp e
Is This Answer Correct ? | 11 Yes | 1 No |
Answer / siva
select nvl2(comm,-10,0) "New Comm" from employees;
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / prajakta
select case when comm is null then 0 else -10 end from emp
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / s.rajeshkumar
select nvl2(comm,0,-10) "New Comm" from employees;
Is This Answer Correct ? | 7 Yes | 6 No |
Answer / swati
update emp set comm =
case
when comm is null then 0
else
10
end
Is This Answer Correct ? | 1 Yes | 4 No |
How would you determine the time zone under which a database was operating?
What are the main diff. between oracle 7.3 and oracle 8i?
Difference between negative and positive adjustments : oracle accounts receivable
what are the types of LIST REPORTS in cognos8BI? and what is the mean and use of METRIC STUDIO in Cognos 8.3BI?
Is Oracle 7.3 is a single user or multi user..Is it possible to use this as a backend for web applications?
Explain the difference between ARCHIVELOG mode and NOARCHIVELOG mode and the benefits and disadvantages to each.
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.
what are the interface and api table for receipts conversion in oracle receivables? : oracle accounts receivable
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?
HOW TO SPOT AHIERARCHY?
what is difference between inner join & nested query or subqueries
How to find locks exists in a table or not?