Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle VARCHAR2 Data Type      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

Term: VARCHAR2

Definition:
The VARCHAR2 data type is used to store variable length strings. The string value's length will be stored on disk along with the value itself.

How the data is represented internally depends on the database character set. The VARCHAR2 datatype takes a required parameter that specifies a maximum size up to 32767 bytes.

Example VARCHAR2 Syntax:

VARCHAR2(maximum_size [CHAR | BYTE])

You cannot use a symbolic constant or variable to specify the maximum size; you must use an integer literal in the range 1 to 32767.

You can insert any VARCHAR2 value into a LONG column type because the maximum width of a LONG column is 2**31 bytes, but you cannot retrieve a value longer than 32767 bytes from a LONG column into a VARCHAR2 variable.


Also See:
Definition & Examples: VARCHAR Data Type
Definition & Examples: CHAR Data Type

Related Links:
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 47 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?