what is difference between decode and case function?

Answer Posted / neha sinha

1)Performance wise Case is good.

2)Case is easy to understand and debug.

3)Case is ANSI stranded and Decode is property of oracle.

4) We can use Decode only in SQL but we can use Case any
where like Function/procedure.

5)Decode can be use only for continuous data not for range
value. but case can be use for range value and it allowed
operator like ">" "between" also.

Is This Answer Correct ?    17 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I remove sql developer from windows 10?

501


how would you enter characters as hex numbers? : Sql dba

509


what is the use of friend function? : Sql dba

535


Why is pl sql used?

521


What is sql architecture?

553






What is the difference between a subquery and a join?

522


What is data modelling in sql?

517


How to use transactions efficiently : transact sql

538


Is there a 64 bit version of ssms?

509


what is sp_pkeys? : Transact sql

692


what are aggregate and scalar functions? : Sql dba

546


What is a composite primary key?

575


How to know the last executed procedure?

583


How do I run a sql trace?

516


How can check sql version from command line?

525