in oracle 9i: NVARCHAR2 (size) – A variable-sized field of characters, where the character set is determined by its definition. The maximum size is 4000 bytes per row or 4000 characters. This handles multibyte character sets.是9i么? 最多4000个字符。

解决方案 »

  1.   


    You use the NVARCHAR2 datatype to store variable-length Unicode character data. How the data is represented internally depends on the national character set specified when the database was created, which might use a variable-width encoding (UTF8) or a fixed-width encoding (AL16UTF16). Because this type can always accommodate multibyte characters, you can use it to hold any Unicode character data.The NVARCHAR2 datatype takes a required parameter that specifies a maximum size in characters. The syntax follows:NVARCHAR2(maximum_size)
    Because the physical limit is 32767 bytes, the maximum value you can specify for the length is 32767/2 in the AL16UTF16 encoding, and 32767/3 in the UTF8 encoding.You cannot use a symbolic constant or variable to specify the maximum size; you must use an integer literal.The maximum size always represents the number of characters, unlike VARCHAR2 which can be specified in either characters or bytes.my_string NVARCHAR2(200); -- maximum size is 200 characters
    The maximum width of a NVARCHAR2 database column is 4000 bytes. Therefore, you cannot insert NVARCHAR2 values longer than 4000 bytes into a NVARCHAR2 column.--------------------------------------------------------------------------------------------------------------------------------------There are three length, database nvarchar2 length, PL/SQL nvarchar2 length, and PL/SQL buffer length. Your problem may that ps is longer than roughly 9000/3. Try to increase ls size.