This example shows the expression in decimal format, but only shows the characters from the 9th position onwards. SELECT DUMP('Complete IT Professional', 10, 9) as DUMP_TEST FROM dual
This example shows the DUMP function with a return_format value of 10, using a start_position. This result is similar to an earlier example, but includes the CharacterSet inside the string.Įxample 7 – Format 10 with Start Position
SELECT DUMP('Complete IT Professional', 1008) as DUMP_TEST FROM dual This example shows the DUMP function with a return_format value of 1008, which includes the character set name. The result is similar to earlier examples, but the actual characters are shown SELECT DUMP('Complete IT Professional', 17) as DUMP_TEST FROM dual This example shows the DUMP function with a return_format value of 17. The result is similar to earlier examples, but uses the hexadecimal notation. SELECT DUMP('Complete IT Professional', 16) as DUMP_TEST FROM dual This example shows the DUMP function with a return_format value of 16. The result is the same as the first example, as the default return_format value is 10, which is the decimal notation. SELECT DUMP('Complete IT Professional', 10) as DUMP_TEST FROM dual This example shows the DUMP function with a return_format value of 10. The result is similar to the first example, but uses the octal notation for the expression. This example shows the DUMP function with a return_format value of 8 SELECT DUMP('Complete IT Professional', 8) as DUMP_TEST FROM dual
The result shows the type number, the length of the expression, and a series of numbers that indicates the characters in the expression. SELECT DUMP('Complete IT Professional') as DUMP_TEST FROM dual This example shows a simple DUMP function. I find that examples are the best way for me to learn about code, even with the explanation above. Here are some examples of the DUMP function.
Refer to the Examples section below for more information. Single characters with character set nameĪs you can see, adding a “10” before the return_format will include the character set name in the output. Hexadecimal notation with character set name You can use several different return formats for this function. If return_format is omitted, the default value to use is 10.The returned result is always in the database character set.If the expression is NULL, the function returns NULL.length (optional): Denotes the length, from the start_position, in the expression to return the internal representation for.start_position (optional): Denotes the starting position in the expression to return the internal representation for.return_format (optional): This is the format of the data to be returned.As with many functions, the expression can be a column or any other kind of expression. expression (mandatory): This is the expression that will be analysed and will have the information written out by the function.
The parameters of the Oracle DUMP function are: The syntax of the DUMP function is: DUMP ( expression ) It also shows the length, and the internal representation of the expression. The Oracle DUMP function will return a string that explains what the data type of an expression is.
Let’s learn how to use it and see some examples in this article. The Oracle DUMP function tells you the data type of an expression.