Variables with character datatypes store text and are manipulated by character functions. Working with character data can range in difficulty from easy to quite challenging. In this chapter, we discuss PL/SQL's core string functionality largely in the context of single-byte character sets—for example, those that are commonly used in Western Europe and the United States. If you are working with Unicode or with multi-byte character sets, or are dealing with multiple languages, be sure to read about globalization and localization issues in Chapter 24.
CLOB (character large object) and LONG, while arguably character types, cannot be used in the same manner as the character types discussed in this chapter, and are more usefully thought of as large object types. We discuss large object types in Chapter 13.
Oracle supports four string datatypes, which are summarized in Table 8-1. Which type you should use depends on your answers to the following two questions:
Are you working with variable-length or fixed-length strings ?
Do you want to use the database character set or the national character set?
Table 8-1. PL/SQL's string datatypes
Database character set
National character set
You will rarely need or want to use the fixed-length CHAR and NCHAR datatypes in Oracle-based applications; in fact, we recommend that you never use these types unless there is a specific requirement for fixed-length strings. ...