Skip to Content
Oracle SQL: the Essential Reference
book

Oracle SQL: the Essential Reference

by David C. Kreines
September 2000
Intermediate to advanced
418 pages
11h 5m
English
O'Reilly Media, Inc.
Content preview from Oracle SQL: the Essential Reference

1.4. Datatypes

Oracle stores data in the database in any of three basic families of datatypes: character, numeric, and date. Both the character and numeric families have several distinct datatypes associated with them, which are described in the following sections.

1.4.1. Character Data

Character data is any string of one or more bytes of data that will not be the direct target of an arithmetic operation. Oracle (and SQL) supports several types of character data, which are listed below with their usage syntax:

CHAR [(length)]

Fixed-length character data, with a maximum length of 2000 bytes. length specifies the maximum length of the character string to be stored.

VARCHAR2 [(length)]

Variable-length character data, with a maximum length of 4000 bytes. length specifies the maximum length of the character string to be stored.

NCHAR [(length)]

Fixed-length character data consisting of characters from a National Character Language (NLS) supported character set. Since a character may require more than one byte, the maximum length is 2000 bytes (which may allow fewer than 2000 characters). length specifies the maximum length of the character string to be stored.

NVARCHAR2 [(length)]

Variable-length character data consisting of characters from a National Language Support (NLS) character set. Since a character may require more than one byte, the maximum length is 4000 bytes (which may allow fewer than 4000 characters).length specifies the maximum length of the character string to be ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle Database 12c The Complete Reference

Oracle Database 12c The Complete Reference

Kevin Loney, Bob Bryla
Oracle SQL Developer

Oracle SQL Developer

Ajith Narayanan, Susan Harper
Oracle PL/SQL for DBAs

Oracle PL/SQL for DBAs

Arup Nanda, Steven Feuerstein

Publisher Resources

ISBN: 1565926978Catalog PageErrata