Scripts here at work always declare varchar2 columns as varchar2(n char). I do not see any difference and just curious. Thanks!
Based on this resource
Oracle9i and above allow Varchar2 columns to be defined as a number of bytes VARCHAR2(50 BYTE) or a number of characters VARCHAR2(50 CHAR), the latter is useful if the database is ever converted to run a double-byte character set (such as Japanese), you won't have to edit the column sizes. The default measure, normally BYTE, is set with nls_length_semantics.
If you create a column as Varchar2 (50) but only store 10 bytes, then Oracle will only save 10 bytes to disc. This does not mean that you should just create Varchar2 (4000) columns 'just in case the space is needed', that is a really bad idea which will reduce the performance and maintainability of your application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With