Oracle7 Server SQL Reference

Contents Index Home Previous Next

Oracle Datatypes

Oracle7 has new datatypes and changes to existing datatypes. This section discusses how Oracle7 treats these types of data:

Numeric Datatypes

Oracle7 returns an error if a numeric expression evaluates to a value greater than or equal to 10126 or less than or equal to -10126. Oracle Version 6 returned a tilde (~) for a value outside these limits.

Character Datatypes

This section discusses the differences in Oracle Version 6 and Oracle7 character datatypes. For information on upgrading to Oracle7 with respect to these differences, see Oracle7 Server Migration.

In Oracle Version 6

Oracle Version 6 supported one datatype for character strings:

CHAR

Values of this datatype were variable length character strings of maximum length 255 characters. Oracle Version 6 compared CHAR values using non-padded comparison semantics.

Oracle Version 6 also supported these synonyms for the CHAR datatype:

In Oracle7

Oracle7 supports two datatypes for character strings:

CHAR

Values of this datatype are fixed length character strings of maximum length 255 characters. Oracle7 compares CHAR values using blank-padded comparison semantics. Note that the Oracle7 CHAR datatype is not equivalent to the Oracle Version 6 CHAR datatype.

VARCHAR2

Values of this datatype are variable length character strings of maximum length 2000. Oracle7 compares VARCHAR2 values using non-padded comparison semantics. The VARCHAR2 datatype is equivalent to the Oracle Version 6 CHAR datatype except for the difference in maximum lengths.

Attention: Oracle Version 6 only had the CHAR datatype available. In Version 6, VARCHAR and VARCHAR2 were synonyms for CHAR. Thus, the default datatype of character strings was CHAR. In Oracle7, the default character type is VARCHAR2.

Oracle7 also supports these synonyms for the CHAR and VARCHAR2 datatypes:

CHARACTER

This datatype is synonymous with the Oracle7 CHAR datatype.

VARCHAR

This datatype is currently synonymous with the VARCHAR2 datatype. However, Oracle Corporation recommends that you use VARCHAR2 rather than VARCHAR. In a future version of Oracle, VARCHAR may be a separate datatype used for variable length character strings compared with different comparison semantics.

For complete information on the Oracle7 datatypes, including the differences between blank-padded and non-padded comparison semantics, see the sections, "Character Datatypes," [*], and "Datatype Comparison Rules," [*].

LONG Datatype

The LONG datatype has new properties and fewer restrictions:

For more information on the LONG datatype, see the section "LONG Datatype" [*].

Label Data

Labels are used by the Trusted Oracle7 to mediate access to information. The new MLSLABEL datatype is used to store representations of labels. For more information on these datatypes, see Trusted Oracle7 Server Administrator's Guide.


Contents Index Home Previous Next