[1066105 views]

[]

[toggle ads]

Odi's astoundingly incomplete notes

New entries | Code

Oracle string sizing

When you create a column in an Oracle table with VARCHAR2(32) this means the string can take up 32 bytes. With UTF-8 becoming more and more popular this is not the same as 32 characters. (In UTF-8 characters can use one to four bytes.) To circumvent this problem make sure to always create columns explicitely with the length in characters: VARCHAR2(32 CHAR).

posted on 2006-05-03 12:01 CEST in Code | 0 comments | permalink