Difference Between Char And Varchar In Oracle. Then to store data more efficiently use the VARCHAR2 data type. In VARCHAR If the length of string is less than set or fixed length then it will store as it is without padded with extra memory spaces.
In addition the maximum byte length of an NVARCHAR2 depends on the configured national character set. But remember when you assign a character value to a CHARvariable if the value is shorter than the declared length of the variable PLSQL blank-pads the value to the declared length. Varchar stands for variable length character string.
So could you pleas eexplain which one is good to use in our code and why.
The CHAR data type blank-pads and stores trailing blanks up to a fixed column length for all column values whereas the VARCHAR2 data type does not add extra blanks. Varchar stands for variable length character string. Jan 27 2015 What is the difference between Char and Varchar. They are used to store strings.
