Quick Search:
 The Oracle VARCHAR2 Data Type      [Return To Index] Jump to:  


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 |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org