Structured query language (SQL) is a language used to manage database data. There are numerous statements and functions available to manipulate data. The decode function is used to compare statements and variables. It emulates the "if, else if" functionality which is provided within the Basic formula language. An example involving the use of the decode function within Oracle sql may be found
. at http://www.geekinterview.com/talk/449-decode-in-sql.html