Custom Search
www.rocket99.com : Technical Guides Sybase Oracle UNIX Javascript


Technical Guides
Sybase
Oracle
UNIX
Javascript




Of Interest

Business Intelligence and Analytics



Oracle Training





Oracle » PL-SQL » Decode »

Decode Function

     




This is one of the more popular functions available in PL-SQL.




Syntax:

DECODE ( <subject>, <testval>, <return-this-if-true>, <otherwise-return-this> )


Example:

select DECODE ( bonus, null, 100, bonus + 100 )
from employee ;





In this example, the column bonus is tested, if it is null, then 0 is returned, otherwise the bonus + 100 is returned.








Oracle : Related Topics


Sybase Web Site
Sybase iAnywhere Mobile Web Site
Oracle Enterprise Web Site



Get the latest Rocket99 news and tech tips via






Site Index About this Guide to Sybase, Oracle, and UNIX Contact Us Advertise on this site




Copyright © 2016 Stoltenbar Inc All Rights Reserved.