PL/SQL (MOSC)

MOSC Banner

IF/Then/Else vs Decode in Select from Dual?

edited Dec 8, 2010 1:28AM in PL/SQL (MOSC) 23 commentsAnswered
We have a major debate going on.   A developer built logic into PLSQL where he does a select from dual using a decode rather than just using an IF/Then/Else statement in PLSQL.  The question is which one is more efficient. Is there a cost to doing the decode within a select since there is no other reason to have to do a select in this part of the logic?  We are on 10g DB so there should not be any IO doing the select from dual.
What is the best practice here or is there one?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center