![]() ![]() At that time oracle decode function returned string is varchar2 data types and it is the same character set as the first search result parameter. If search value, actual expression and the result can be any one of the data types such as char, varchar2, nchar or nvarchar. If actual expression and search value are the characters at that time oracle decodes function compare them by using the non padded comparison semantics. In which if the first search pair is the numeric at that time oracle decode function compares all search result expressions and in first search expression it finds which value is the highest numeric precedence and remaining argument convert to that data type and decode function returns the particular data type. It is used as a number, binary_float or binary_double. ![]() Now let’s see how the decode function works in Oracle:īasically decode function is used to find any match value by using if – then – else statement.ĭifferent types of arguments that we use in Oracle decode function are as follows: 1. default: This is optional keyword, if there is no matches are found the decode function oracle returns the default value, if sometimes default value is omitted then it returns the null value (if decode function does not found any match value).search result: It is used to display the search result that means if actual expression is equal to search value then it returns the result.Similarly here all search values are automatically converted to the data type that is used for the first search value before comparing. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |