Wednesday, March 04, 2009

Oracle Char vs VarChar vs Varchar2 datatype

I was kinda confused earlier on the differences but get a better explaination after hunting around. Below details each of their characteristics:

Char: Declare and used. If the size declared is 5 and assigned value is only length 2, the leftover will be stored with spaces. Some claimed this would be much faster, but some doesn't find any differences in performance comparison to varchar.
VarChar: Declare in advance, size used only when assigning values. Depending on the values assigned, for those that have not been used or excessive size allocated will be freed. First few bites will store the length of the values assigned. ANSI SQL Standard.
VarChar2: It is an oracle's improved Varchar datatype version. Characteristics are mostly similar to varchar.

Do you have anything to addon?

Your Ad Here