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 does one use sql*loader to load images, sound clips and documents? : aql loader

883


When is the explicit cursor used ?

764


What is normalization? How many normalization forms are there?

747


What is #table in sql?

706


What is a table partition?

789






How do you use a while loop in pl sql?

719


Are stored procedures faster than dynamic sql?

738


How is data stored in sql?

726


Can a table contain multiple primary key’s?

806


How do I make sql search faster?

768


How long will it take to learn pl sql?

689


Is inner join same as self join?

785


how many tables will create when we create table, what are they? : Sql dba

765


What is the purpose of a secondary key?

679


Is there a pl/sql pragma similar to deterministic, but for the scope of one single sql select?

754