Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is difference between decode and case function?

Answers were Sorted based on User's Feedback



what is difference between decode and case function?..

Answer / 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

what is difference between decode and case function?..

Answer / 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

More SQL PLSQL Interview Questions

I have a Employee table with columns ename,eid,salary,deptno. How to retrieve sum of salary for each deptno?

8 Answers   L&T,


What are the properties of a transaction?

0 Answers  


What is normalization? dec 2009

3 Answers   Cognizant,


How do I sort a table in sql?

0 Answers  


How many developers work on postgresql?

0 Answers  


Is postgresql a server?

0 Answers  


How to place comments in pl/sql?

0 Answers  


How to create an array in pl/sql?

0 Answers  


What is the relation b/w view and trigger

3 Answers   Accenture, TCS,


What is the difference between anonymous block and named blocks?

3 Answers  


What are sql injection vulnerabilities?

0 Answers  


How do I create a memory optimized filegroup?

0 Answers  


Categories