GotoDBA Did You Know Did You Know #1 – Unicode

Did You Know #1 – Unicode

Hi,
So, this is the first “Did you know” post, and this time, unicode characters in char/varchar2 columns. Did you know that the hard limit for char is 2000 bytes and for varchar2 is 4000 bytes (can be extended to 32768 in 12c), regardless the characterset?
This means that even if you use “VARCHAR2(4000 CHAR)” in a column definition (which defines the column to have a maximum of 4000 characters and not 4000 bytes), the maximum is 4000 bytes. In AL32UTF8, characters can be up to 4 bytes, so in the worst case scenario you will be able to have only 1000 4-bytes character in this column.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post