May I please have a description of the VARCHAR2 datatype? This datatype is used in our catalogue database and I cannot find an explanation that will provide a clear understanding.
The VARCHAR2 datatype is used to hold character data, including numbers. This datatype is "variable" in the sense that it will not allocate space for unused characters. For instance, if you define your column as VARCHAR2(30), it can hold up to 30 characters. If you are using a single-byte character set, those 30 characters can require 30 bytes of storage space. If you store a five-letter word in that column, the VARCHAR2 datatype does not require all 30 bytes to be allocated. Rather, it only needs the space to store that five-letter word, or five bytes in a single-byte character set.
A complete description of all datatypes can be found in the Oracle documentation.
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.