Oracle dump函數

來源:互聯網
上載者:User

Oracle dump函數

DUMP
文法

DUMP(expr[, return_fmt
            [, start_position [, length ] ]
        ]
    )


用途

DUMP returns a VARCHAR2 value containing the datatype code, length in bytes, and internal representation of expr. The returned result is always in the database character set.

DUMP返回一個包含資料類型代碼,位元組長和內部運算式的VARCHAR2類型值。

The argument return_fmt specifies the format of the return value and can have any of the following values:

Return_fmt參數指定傳回值的格式,包含以下值:

8 返回8進位數

10 返回10進位數

16 返回16進位數

17 returns each byte printed as a character if and only if it can be interpreted as a printable character in the character set of the compiler—typically ASCII or EBCDIC. Some ASCII control characters may be printed in the form ^X as well. Otherwise the character is printed in hexidecimal notation. All NLS parameters are ignored. Do not depend on any particular output format for DUMP with return_fmt 17.

每一個位元組如果可翻譯為列印字元位元組則作為列印字元返回,否則字元以16進位資料返回。所有NLS參數將被忽略。不要指望著使用DUMP 17來輸出專屬的格式。

By default, the return value contains no character set information. To retrieve the character set name of expr, add 1000 to any of the preceding format values. For example, a return_fmt of 1008 returns the result in octal and provides the character set name of expr.

The arguments start_position and length combine to determine which portion of the internal representation to return. The default is to return the entire internal representation in decimal notation.

預設的,函數傳回值不包含字元集資訊。可對return_fmt加1000來實現返回字元集資訊。例如, 1008返回8進位數並提供運算式的字元集名稱。

參數start_position和length一起決定了該返回那一部分內部運算式。預設是返回全部。

If expr is null, then this function returns NULL.

如果運算式為NULL則函數返回NULL。

This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion.

此函數不直接支援CLOB資料。然而,CLOB可以作為參數通過隱式轉換傳入。

例子


SELECT DUMP('abc', 1016)
  FROM DUAL;

DUMP('ABC',1016)                         
------------------------------------------
Typ=96 Len=3 CharacterSet=WE8DEC: 61,62,63
SELECT DUMP(last_name, 8, 3, 2) "OCTAL"
  FROM employees
  WHERE last_name = 'Hunold'
  ORDER BY employee_id;

OCTAL
-------------------------------------------------------------------
Typ=1 Len=6: 156,157

SELECT DUMP(last_name, 10, 3, 2) "ASCII"
  FROM employees
  WHERE last_name = 'Hunold'
  ORDER BY employee_id;

ASCII
--------------------------------------------------------------------
Typ=1 Len=6: 110,111

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.