O'Reilly logo

Oracle PL/SQL Programming, Third Edition by Bill Pribyl, Steven Feuerstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Strings

Variables with character datatypes store text and are manipulated by character functions. Because character strings are “free-form,” there are few rules concerning their content. For example, you can store numbers and letters, as well as any combination of special characters, in a character-type variable. There are, however, several different kinds of character datatypes, each of which serves a particular purpose.

Tip

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 12.

The Impact of Character Sets

Working with strings used to be a short and simple topic. However, as applications have grown more international in nature, Oracle’s support for different character sets, especially Unicode, has expanded, and a good understanding of character set issues is now almost a necessity when working with strings.

What Is a Character Set?

A character set is a mapping between a set of characters meaningful to humans and a set of bit sequences used to represent those characters in a computer or on a disk. 7-bit ASCII is a commonly used character set in the United States. Each 7-bit ASCII character is represented as a sequence of seven bits within an eight-bit byte. The letter G, then, is represented as 0100 0111. Look at that same string of bits as a number, and you end up with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required