Q

What is the VARCHAR2 datatype?

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.

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.

This was first published in November 2005

Dig deeper on Oracle database design and architecture

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close