Problem solve Get help with specific problems with your technologies, process and projects.

More on VARCHAR2 versus VARCHAR

Re: Why does Oracle recommend using VARCHAR2 instead of VARCHAR datatypes?

Correct me if I'm wrong, but I believe VARCHAR is an ANSI standard datatype that allows zero length strings that are not null (which Oracle doesn't support.) If Oracle ever complies with the ANSI standard code, that specifies VARCHAR may break. The semantics of VARCHAR2 won't change in future releases, except to increase the max allowable size.

Actually, Oracle Corp. has changed the semantics of the VARCHAR2 datatype. Currently, in Oracle 9i, when you insert a zero length string into a VARCHAR2 column, Oracle treats this the same as if you insert a NULL value into that column. But it wasn't always this way. Previous versions of the database treated zero length strings and NULL values as two distinctly different items.

For More Information

This was last published in January 2003

Dig Deeper on Oracle database design and architecture

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.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.