When I was doing a system, I met a question! I have found the solution to this problem today, post it !!!
Problem Description:
VARCHAR2 (4000) ABC;
Intert Into Table_name (ABC) Values ('There are 1500 Chinese characters ...');
Report: Insert characters are too long! After testing, I found a Chinese character accounted for 3 bytes, so I'm wrong! ! !
problem lies in:
The character set used is UTF8, which may have this error!
Use the command to view:
SQL> Select * from V $ nls_parameters where parameter = 'nls_characterset'
Parameter
-------------------------------------------------- ------------------------------
Value
-------------------------------------------------- ------------------------------
NLS_Characterset
Al32UTF8
Solution:
It is recommended to use the ZHS16GBK character set!
operating:
SQL> Shutdown Immediate;
SQL> Startup Mount;
SQL> ALTER System Enable Restricted Session;
SQL> ALTER SYSTEM SET JOB_QUEUE_PROCESS = 0;
SQL> ALTABASE OPEN;
SQL> ALTER DATABASE Character Set Al32UTF8 / ZHS16GBK;
SQL> Shutdown Immediate;
SQL> Startup;
problem solved! ! !