Tuesday, June 14, 2022

Oracle SQL Varchar2 Data Type

1.Used to store variable length character values.
2.No default size. we must specify size and max size is 4000 chars/bytes.
3.It means that for a single-byte character set, you can store up to 4000 characters in a VARCHAR2 column VARCHAR2(size BYTE),VARCHAR2(size CHAR).
4.By default, Oracle uses BYTE don’t specify BYTE or CHAR after the size. VARCHAR2(N) column can hold up  to N bytes of characters.
5.If you store 10 characters in a VARCHAR2(20) column, Oracle uses only 10 bytes for storage, not 20 bytes. Therefore, using VARCHAR2 data type helps you save spaces used by the table

No comments:

Post a Comment