Varying-length character string (VARCHAR)
Varying-length character strings are stored in the database using only the amount of space required to store the data. The individual names, in our example, are stored as varying-length strings (VARCHAR) because each persons name has a different length (up to a maximum length of 30 characters). The term CHAR VARYING or CHARACTER VARYING can be used as a synonym for VARCHAR.
If a varying-length character string is updated and the resulting value is larger than the original, the record will be moved to another page in the table. These rows are known as tombstone records or pointer records. Too many of these records can cause significant performance degradation since multiple pages are required to return a single row. The maximum length of a VARCHAR column is 32,672 bytes.
Varying-length long character strings (LONG VARCHAR)
This data type is used to store character data with a varying length. In the past it was used when the VARCHAR was not large enough; however, with the increase of the VARCHAR column to 32,672, the LONG VARCHAR data type may not be used as often.
A VARCHAR column has the restriction that it must fit on one database page. This means that a 4K page would allow a VARCHAR of approximately 4000 characters long, an 8K page would be 8000 and so on up to a 32K page. This means that you must create a tablespace for this table that can accommodate the larger page size, and you must have sufficient space in the row to accommodate this string. A LONG VARCHAR only takes up 24 bytes of space in the row, no matter what the length is. The LONG VARCHAR format will result in the strings being stored in a separate database page, and this will result in longer processing time for these strings since the database will always need to make an extra hop to get to this data.
The maximum length of a LONG VARCHAR column is 32,700.