Đang chuẩn bị liên kết để tải về tài liệu:
Oracle Built−in Packages- P92
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Oracle Built−in Packages- P92: Ah, for the good old days of Version 1.0 of PL /SQL! Life was so simple then. No stored procedures or functions and certainly no packages. You had your set of built−in functions, like SUBSTR and TO_DATE. You had the IF statement and various kinds of loops. With these tools at hand, you built your batch−processing scripts for execution in SQL*Plus, and you coded your triggers in SQL*Forms 3.0, and you went home at night content with a good day's work done. | Appendix A What s on the Companion Disk 9.2.2 Raw Data Manipulation Concepts This section provides an overview of the types of data manipulation you might perform on raw data. 9.2.2.1 Conversion and coercion Conversion refers to functions that convert raw byte strings to other values. Coercion is a specialized conversion that changes the datatype but not the data itself. UTL_RAW has functions that convert from one NLS language set to another from one set of raw byte strings to another and from raw datatypes to VARCHAR2 datatypes as well as from VARCHAR2 to raw . The coercion operations supported by Oracle involving raw datatypes via the standard SQL functions are raw-to-hex and hex-to-raw via UTL_RAW functions they are raw-to-VARCHAR2 and VARCHAR2-to-raw. Notably unsupported are raw-to from-numeric datatypes and raw-to from-date datatypes. 9.2.2.2 Slicing and dicing Slicing and dicing refers to functions that divide and combine raw byte strings in various ways. These functions include COMPARE CONCATENATE COPY LENGTH OVERLAY REVERSE and SUBSTRING. 9.2.2.3 Bit-fiddling Bit-fiddling refers to the manipulation of individual bits. Because bits are the smallest possible unit of storage bit-fiddling provides a highly efficient storage mechanism. Bitmap indexes take advantage of this and offer substantial disk savings over traditional Btree indexes. The Oracle kernel supports the bitwise AND function natively via the undocumented function BITAND x x 1 but the other bitwise operations needed to support bitmasks are supported only via the UTL_RAW package. 1 See the definitions of some V tables such as V session_wait in the V fixed_view_definition view. Bitmasks are commonly used to combine a number of flags or semaphores into a single object as follows To see if a bit flag semaphore is set use the bitwise AND function. To turn a bit on or combine bitmasks use the bitwise OR function. To turn a bit off use the bitwise OR and NOT functions together. To toggle a bit use the .