TAILIEUCHUNG - PL/SQL User’s Guide and Reference phần 2

Được sử dụng rộng rãi một byte bộ ký tự ASCII, EBCDIC là đủ để đại diện cho bảng chữ cái La Mã, nhưng một số ngôn ngữ châu Á, như Nhật Bản, có hàng ngàn ký tự. Những ngôn ngữ này yêu cầu hai hoặc ba byte để đại diện cho mỗi nhân vật. Làm thế nào để Oracle đối phó với các ngôn ngữ khác nhau? Oracle cung cấp Hỗ trợ Ngôn ngữ Quốc gia (NLS), | Datatypes National Character Types The widely used one-byte ASCII and EBCDIC character sets are adequate to represent the Roman alphabet but some Asian languages such as Japanese contain thousands of characters. These languages require two or three bytes to represent each character. How does Oracle deal with such dissimilar languages Oracle provides National Language Support NLS which lets you process single-byte and multi-byte character data and convert between character sets. It also lets your applications run in different language environments. With NLS number and date formats adapt automatically to the language conventions specified for a user session. Thus NLS allows users around the world to interact with Oracle in their native languages. PL SQL supports two character sets called the database character set which is used for identifiers and source code and the national character set which is used for NLS data. The datatypes NCHAR and NVARCHAR2 store character strings formed from the national character set. Note When converting CHAR or VARCHAR2 data between databases with different character sets make sure the data consists of well-formed strings. For more information see Oracle8i National Language Support Guide. NCHAR You use the NCHAR datatype to store fixed-length blank-padded if necessary national character data. How the data are represented internally depends on the character set which might use a fixed-width encoding such as US7ASCII or a variable-width encoding such as JA16SJIS. The NCHAR datatype takes an optional parameter that lets you specify a maximum size up to 32767 bytes. The syntax follows NCHAR maximum_size You cannot use a constant or variable to specify the maximum size you must use an integer literal in the range 1 . 32767. If you do not specify a maximum size it defaults to 1. How you specify the maximum size depends on the national character set. For fixed-width character sets you specify the maximum size in characters. For variable-width

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.