what is difference between decode and case function?

Answer Posted / shiva kumar

Case functions are of two types
1. SIMPLE CASE(Equivalent to DECODE)
2. SEARCHED CASE

1.SIMPLE CASE is equivalent to DECODE in performance.The
only difference is it is ANSI Standard where as DECODE
function is designed by oracle.

2.SEARCHED CASE is more powerful then DECODE.Using SEARCHED
CASE we can evaluate multiple conditions,range evaluation.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how many sql dml commands are supported by 'mysql'? : Sql dba

565


Are left and right joins the same?

525


What is file based approach?

485


what is sql in mysql? : Sql dba

569


Explain the steps needed to create the scheduled job?

551






What is the meaning of disabling a trigger?

643


what is the difference between sql and t-sql? : Transact sql

593


What does pragma mean?

500


What are string functions in sql?

669


Is mariadb nosql?

575


What is varray in pl sql?

561


a table has 2 classifications 1)liabilities 2)earnings this liabitity has 2 elements with 2 input values and the earnings have 2 elements with 2 input values i wrote a query so that my input is liability savings amount1 amount2 xxxx null xxxxxx 0 xxx1 null xxxxx1 0 null yyyy 0 yyyy null yyy1 0 yyy1 my problem is --when i developed a report(d2k) with this data my o/p is liabilities,amount1,savings,amount2 xxxx xxxxxx xxx1 xxxxx1 yyyy yyyy yyy1 yyy1 how could i move this savings,savings values 2 palces up. can any body provide me witha better solution

1768


what are the non-standard sql commands supported by 'mysql'? : Sql dba

569


what is the syntax for using sql_variant_property? : Transact sql

527


What is difference between hql and native sql?

571